home *** CD-ROM | disk | FTP | other *** search
/ Turnbull China Bikeride / Turnbull China Bikeride - Disc 2.iso / BARNET / MANUALS / THOMAS / INTERNET / Internet
Unknown  |  1996-08-21  |  26.0 KB

open in: MacOS 8.1     |     Win98     |     DOS

view JSON data     |     view as text


This file was not able to be converted.
This format is not currently supported by dexvert.

ConfidenceProgramDetectionMatch TypeSupport
100% file data default
100% gt2 Kopftext: 'HELP(' default (weak)



hex view
+--------+-------------------------+-------------------------+--------+--------+
|00000000| 48 45 4c 50 28 00 00 00 | c9 00 00 00 ff ff ff ff |HELP(...|........|
|00000010| 2c 00 00 00 00 fd ff ff | 00 00 00 00 18 06 00 00 |,.......|........|
|00000020| 00 01 00 00 00 00 00 00 | 24 00 00 00 44 49 52 24 |........|$...DIR$|
|00000030| 20 06 00 00 20 06 00 00 | 4c 06 00 00 46 fd ff ff | ... ...|L...F...|
|00000040| 51 f7 07 d8 24 00 00 00 | 13 00 00 00 00 00 00 00 |Q...$...|........|
|00000050| 21 43 6f 6e 66 69 67 75 | 72 65 00 00 70 06 00 00 |!Configu|re..p...|
|00000060| 46 fd ff ff 19 5f 04 d8 | db 02 00 00 13 00 00 00 |F...._..|........|
|00000070| 00 00 00 00 74 68 65 69 | 6e 74 65 72 6e 65 74 65 |....thei|nternete|
|00000080| 76 65 6e 74 00 00 00 00 | 4c 09 00 00 46 fd ff ff |vent....|L...F...|
|00000090| 8e 3c 64 ce 6e 03 00 00 | 13 00 00 00 00 00 00 00 |.<d.n...|........|
|000000a0| 45 72 72 6f 72 73 00 00 | bc 0c 00 00 46 fd ff ff |Errors..|....F...|
|000000b0| e5 36 64 ce 9b 04 00 00 | 13 00 00 00 00 00 00 00 |.6d.....|........|
|000000c0| 43 6f 6e 73 74 61 6e 74 | 73 00 00 00 58 11 00 00 |Constant|s...X...|
|000000d0| 47 fd ff ff 60 4d 28 01 | 6c 03 00 00 13 01 00 00 |G...`M(.|l.......|
|000000e0| 00 00 00 00 53 6f 63 6b | 65 74 5f 00 28 5d 00 00 |....Sock|et_.(]..|
|000000f0| 45 fc ff ff c3 d8 0e e3 | 20 00 00 00 13 00 00 00 |E.......| .......|
|00000100| 00 00 00 00 21 50 72 65 | 00 00 00 00 48 5d 00 00 |....!Pre|....H]..|
|00000110| 47 fd ff ff d4 06 a8 00 | b4 04 00 00 13 00 00 00 |G.......|........|
|00000120| 00 00 00 00 21 52 6f 6f | 74 00 00 00 fc 61 00 00 |....!Roo|t....a..|
|00000130| 47 fd ff ff a6 4e 28 01 | 5c 00 00 00 13 01 00 00 |G....N(.|\.......|
|00000140| 00 00 00 00 49 6e 74 65 | 72 6e 65 74 5f 00 00 00 |....Inte|rnet_...|
|00000150| 98 63 00 00 47 fd ff ff | c6 4e 28 01 9c 00 00 00 |.c..G...|.N(.....|
|00000160| 13 01 00 00 00 00 00 00 | 49 6e 74 65 72 6e 65 74 |........|Internet|
|00000170| 55 74 69 6c 73 5f 00 00 | e4 65 00 00 46 fd ff ff |Utils_..|.e..F...|
|00000180| 96 b1 9c d8 f8 01 00 00 | 13 00 00 00 00 00 00 00 |........|........|
|00000190| 68 6f 73 74 65 6e 74 00 | 00 00 00 00 46 ff ff ff |hostent.|....F...|
|000001a0| f3 28 4c ec 00 00 00 00 | 13 00 00 00 00 00 00 00 |.(L.....|........|
|000001b0| 61 63 63 65 70 74 3e 53 | 6f 63 6b 65 74 5f 41 63 |accept>S|ocket_Ac|
|000001c0| 63 65 70 74 00 00 00 00 | 00 00 00 00 46 ff ff ff |cept....|....F...|
|000001d0| f2 e9 4b ec 00 00 00 00 | 13 00 00 00 00 00 00 00 |..K.....|........|
|000001e0| 62 69 6e 64 3e 53 6f 63 | 6b 65 74 5f 42 69 6e 64 |bind>Soc|ket_Bind|
|000001f0| 00 00 00 00 00 00 00 00 | 46 ff ff ff f3 28 4c ec |........|F....(L.|
|00000200| 00 00 00 00 13 00 00 00 | 00 00 00 00 63 6c 6f 73 |........|....clos|
|00000210| 65 3e 53 6f 63 6b 65 74 | 5f 43 6c 6f 73 65 00 00 |e>Socket|_Close..|
|00000220| 00 00 00 00 46 ff ff ff | f3 28 4c ec 00 00 00 00 |....F...|.(L.....|
|00000230| 13 00 00 00 00 00 00 00 | 63 6f 6e 6e 65 63 74 3e |........|connect>|
|00000240| 53 6f 63 6b 65 74 5f 43 | 6f 6e 6e 65 63 74 00 00 |Socket_C|onnect..|
|00000250| 00 00 00 00 46 ff ff ff | 13 ca 4c ec 00 00 00 00 |....F...|..L.....|
|00000260| 13 00 00 00 00 00 00 00 | 46 44 5f 53 45 54 53 49 |........|FD_SETSI|
|00000270| 5a 45 3e 53 6f 63 6b 65 | 74 5f 47 65 74 74 73 69 |ZE>Socke|t_Gettsi|
|00000280| 7a 65 00 00 00 00 00 00 | 46 ff ff ff f3 28 4c ec |ze......|F....(L.|
|00000290| 00 00 00 00 13 00 00 00 | 00 00 00 00 67 65 74 70 |........|....getp|
|000002a0| 65 65 72 6e 61 6d 65 3e | 53 6f 63 6b 65 74 5f 47 |eername>|Socket_G|
|000002b0| 65 74 70 65 65 72 6e 61 | 6d 65 00 00 00 00 00 00 |etpeerna|me......|
|000002c0| 46 ff ff ff d5 f8 4b ec | 00 00 00 00 13 00 00 00 |F.....K.|........|
|000002d0| 00 00 00 00 67 65 74 73 | 6f 63 6b 6e 61 6d 65 3e |....gets|ockname>|
|000002e0| 53 6f 63 6b 65 74 5f 47 | 65 74 73 6f 63 6b 6e 61 |Socket_G|etsockna|
|000002f0| 6d 65 00 00 00 00 00 00 | 46 ff ff ff d5 f8 4b ec |me......|F.....K.|
|00000300| 00 00 00 00 13 00 00 00 | 00 00 00 00 67 65 74 73 |........|....gets|
|00000310| 6f 63 6b 6f 70 74 3e 53 | 6f 63 6b 65 74 5f 47 65 |ockopt>S|ocket_Ge|
|00000320| 74 73 6f 63 6b 6f 70 74 | 00 00 00 00 00 00 00 00 |tsockopt|........|
|00000330| 46 ff ff ff d5 f8 4b ec | 00 00 00 00 13 00 00 00 |F.....K.|........|
|00000340| 00 00 00 00 69 6f 63 74 | 6c 3e 53 6f 63 6b 65 74 |....ioct|l>Socket|
|00000350| 5f 49 6f 63 74 6c 00 00 | 00 00 00 00 46 ff ff ff |_Ioctl..|....F...|
|00000360| d5 f8 4b ec 00 00 00 00 | 13 00 00 00 00 00 00 00 |..K.....|........|
|00000370| 6c 69 73 74 65 6e 3e 53 | 6f 63 6b 65 74 5f 4c 69 |listen>S|ocket_Li|
|00000380| 73 74 65 6e 00 00 00 00 | 00 00 00 00 46 ff ff ff |sten....|....F...|
|00000390| 13 ca 4c ec 00 00 00 00 | 13 00 00 00 00 00 00 00 |..L.....|........|
|000003a0| 72 65 61 64 3e 53 6f 63 | 6b 65 74 5f 52 65 61 64 |read>Soc|ket_Read|
|000003b0| 00 00 00 00 00 00 00 00 | 46 ff ff ff 13 ca 4c ec |........|F.....L.|
|000003c0| 00 00 00 00 13 00 00 00 | 00 00 00 00 72 65 61 64 |........|....read|
|000003d0| 76 3e 53 6f 63 6b 65 74 | 5f 52 65 61 64 76 00 00 |v>Socket|_Readv..|
|000003e0| 00 00 00 00 46 ff ff ff | 13 ca 4c ec 00 00 00 00 |....F...|..L.....|
|000003f0| 13 00 00 00 00 00 00 00 | 72 65 63 76 3e 53 6f 63 |........|recv>Soc|
|00000400| 6b 65 74 5f 52 65 63 76 | 00 00 00 00 00 00 00 00 |ket_Recv|........|
|00000410| 46 ff ff ff 13 ca 4c ec | 00 00 00 00 13 00 00 00 |F.....L.|........|
|00000420| 00 00 00 00 72 65 63 76 | 66 72 6f 6d 3e 53 6f 63 |....recv|from>Soc|
|00000430| 6b 65 74 5f 52 65 63 76 | 66 72 6f 6d 00 00 00 00 |ket_Recv|from....|
|00000440| 00 00 00 00 46 ff ff ff | 13 ca 4c ec 00 00 00 00 |....F...|..L.....|
|00000450| 13 00 00 00 00 00 00 00 | 72 65 63 76 6d 73 67 3e |........|recvmsg>|
|00000460| 53 6f 63 6b 65 74 5f 52 | 65 63 76 6d 73 67 00 00 |Socket_R|ecvmsg..|
|00000470| 00 00 00 00 46 ff ff ff | d5 f8 4b ec 00 00 00 00 |....F...|..K.....|
|00000480| 13 00 00 00 00 00 00 00 | 73 65 6c 65 63 74 3e 53 |........|select>S|
|00000490| 6f 63 6b 65 74 5f 53 65 | 6c 65 63 74 00 00 00 00 |ocket_Se|lect....|
|000004a0| 00 00 00 00 46 ff ff ff | d5 f8 4b ec 00 00 00 00 |....F...|..K.....|
|000004b0| 13 00 00 00 00 00 00 00 | 73 65 6e 64 3e 53 6f 63 |........|send>Soc|
|000004c0| 6b 65 74 5f 53 65 6e 64 | 00 00 00 00 00 00 00 00 |ket_Send|........|
|000004d0| 46 ff ff ff d5 f8 4b ec | 00 00 00 00 13 00 00 00 |F.....K.|........|
|000004e0| 00 00 00 00 73 65 6e 64 | 6d 73 67 3e 53 6f 63 6b |....send|msg>Sock|
|000004f0| 65 74 5f 53 65 6e 64 6d | 73 67 00 00 00 00 00 00 |et_Sendm|sg......|
|00000500| 46 ff ff ff d5 f8 4b ec | 00 00 00 00 13 00 00 00 |F.....K.|........|
|00000510| 00 00 00 00 73 65 6e 64 | 74 6f 3e 53 6f 63 6b 65 |....send|to>Socke|
|00000520| 74 5f 53 65 6e 64 74 6f | 00 00 00 00 00 00 00 00 |t_Sendto|........|
|00000530| 46 ff ff ff d5 f8 4b ec | 00 00 00 00 13 00 00 00 |F.....K.|........|
|00000540| 00 00 00 00 73 65 74 73 | 6f 63 6b 6f 70 74 3e 53 |....sets|ockopt>S|
|00000550| 6f 63 6b 65 74 5f 53 65 | 74 73 6f 63 6b 6f 70 74 |ocket_Se|tsockopt|
|00000560| 00 00 00 00 00 00 00 00 | 46 ff ff ff d5 f8 4b ec |........|F.....K.|
|00000570| 00 00 00 00 13 00 00 00 | 00 00 00 00 73 68 75 74 |........|....shut|
|00000580| 64 6f 77 6e 3e 53 6f 63 | 6b 65 74 5f 53 68 75 74 |down>Soc|ket_Shut|
|00000590| 64 6f 77 6e 00 00 00 00 | 00 00 00 00 46 ff ff ff |down....|....F...|
|000005a0| d5 9c 3c ec 00 00 00 00 | 13 00 00 00 00 00 00 00 |..<.....|........|
|000005b0| 73 6f 63 6b 65 74 3e 53 | 6f 63 6b 65 74 5f 43 72 |socket>S|ocket_Cr|
|000005c0| 65 61 74 00 00 00 00 00 | 46 ff ff ff d5 f8 4b ec |eat.....|F.....K.|
|000005d0| 00 00 00 00 13 00 00 00 | 00 00 00 00 73 74 61 74 |........|....stat|
|000005e0| 3e 53 6f 63 6b 65 74 5f | 53 74 61 74 00 00 00 00 |>Socket_|Stat....|
|000005f0| 00 00 00 00 46 ff ff ff | 13 ca 4c ec 00 00 00 00 |....F...|..L.....|
|00000600| 13 00 00 00 00 00 00 00 | 77 72 69 74 65 3e 53 6f |........|write>So|
|00000610| 63 6b 65 74 5f 57 72 69 | 74 65 00 00 00 00 00 00 |cket_Wri|te......|
|00000620| 46 ff ff ff 13 ca 4c ec | 00 00 00 00 13 00 00 00 |F.....L.|........|
|00000630| 00 00 00 00 77 72 69 74 | 65 76 3e 53 6f 63 6b 65 |....writ|ev>Socke|
|00000640| 74 5f 57 72 69 74 65 76 | 00 00 00 00 44 41 54 41 |t_Writev|....DATA|
|00000650| 24 00 00 00 23 43 6f 6d | 6d 61 6e 64 73 0a 66 53 |$...#Com|mands.fS|
|00000660| 74 64 0a 57 72 61 70 20 | 4f 6e 0a 23 45 6e 64 0a |td.Wrap |On.#End.|
|00000670| 44 41 54 41 db 02 00 00 | 54 68 65 20 49 6e 74 65 |DATA....|The Inte|
|00000680| 72 6e 65 74 20 45 76 65 | 6e 74 0a 23 66 48 32 3a |rnet Eve|nt.#fH2:|
|00000690| 54 68 65 20 49 6e 74 65 | 72 6e 65 74 20 45 76 65 |The Inte|rnet Eve|
|000006a0| 6e 74 0a 23 4c 69 6e 65 | 0a 49 66 20 61 20 73 6f |nt.#Line|.If a so|
|000006b0| 63 6b 65 74 20 68 61 73 | 20 62 65 65 6e 20 6d 61 |cket has| been ma|
|000006c0| 72 6b 65 64 20 66 6f 72 | 20 61 73 79 6e 63 68 72 |rked for| asynchr|
|000006d0| 6f 6e 6f 75 73 20 6f 70 | 65 72 61 74 69 6f 6e 20 |onous op|eration |
|000006e0| 75 73 69 6e 67 20 3c 53 | 6f 63 6b 65 74 5f 49 6f |using <S|ocket_Io|
|000006f0| 63 74 6c 3e 20 74 68 65 | 20 54 43 50 2f 49 50 20 |ctl> the| TCP/IP |
|00000700| 73 74 61 63 6b 20 77 69 | 6c 6c 20 72 61 69 73 65 |stack wi|ll raise|
|00000710| 20 61 20 52 49 53 43 20 | 4f 53 20 65 76 65 6e 74 | a RISC |OS event|
|00000720| 20 28 65 76 65 6e 74 20 | 31 39 29 20 77 68 65 6e | (event |19) when|
|00000730| 20 69 6d 70 6f 72 74 61 | 6e 74 20 63 68 61 6e 67 | importa|nt chang|
|00000740| 65 73 20 6f 63 63 75 72 | 20 77 68 69 63 68 20 61 |es occur| which a|
|00000750| 66 66 65 63 74 20 74 68 | 65 20 73 6f 63 6b 65 74 |ffect th|e socket|
|00000760| 2e 20 57 68 65 6e 20 74 | 68 65 20 65 76 65 6e 74 |. When t|he event|
|00000770| 20 6f 63 63 75 72 73 2c | 20 72 65 67 69 73 74 65 | occurs,| registe|
|00000780| 72 73 20 77 69 6c 6c 20 | 62 65 20 73 65 74 20 61 |rs will |be set a|
|00000790| 73 20 66 6f 6c 6c 6f 77 | 73 3a 0a 0a 20 09 52 30 |s follow|s:.. .R0|
|000007a0| 20 3d 20 31 39 0a 20 09 | 52 31 20 3d 20 45 76 65 | = 19. .|R1 = Eve|
|000007b0| 6e 74 20 63 6f 64 65 0a | 20 09 52 32 20 3d 20 53 |nt code.| .R2 = S|
|000007c0| 6f 63 6b 65 74 20 64 65 | 73 63 72 69 70 74 6f 72 |ocket de|scriptor|
|000007d0| 0a 0a 57 68 65 72 65 20 | 74 68 65 20 73 6f 63 6b |..Where |the sock|
|000007e0| 65 74 20 64 65 73 63 72 | 69 70 74 6f 72 20 69 73 |et descr|iptor is|
|000007f0| 20 74 68 65 20 73 6f 63 | 6b 65 74 20 61 66 66 65 | the soc|ket affe|
|00000800| 63 74 65 64 20 62 79 20 | 74 68 65 20 65 76 65 6e |cted by |the even|
|00000810| 74 2c 20 61 6e 64 20 74 | 68 65 20 65 76 65 6e 74 |t, and t|he event|
|00000820| 20 63 6f 64 65 20 69 73 | 20 6f 6e 20 6f 66 20 74 | code is| on of t|
|00000830| 68 65 20 66 6f 6c 6c 6f | 77 69 6e 67 20 76 61 6c |he follo|wing val|
|00000840| 75 65 73 3a 0a 0a 20 09 | 31 09 20 09 53 6f 63 6b |ues:.. .|1. .Sock|
|00000850| 65 74 20 68 61 73 20 69 | 6e 70 75 74 20 77 61 69 |et has i|nput wai|
|00000860| 74 69 6e 67 20 74 6f 20 | 62 65 20 72 65 61 64 0a |ting to |be read.|
|00000870| 20 09 32 09 20 09 41 6e | 20 75 72 67 65 6e 74 20 | .2. .An| urgent |
|00000880| 65 76 65 6e 74 20 68 61 | 73 20 6f 63 63 75 72 65 |event ha|s occure|
|00000890| 64 20 28 65 67 20 61 72 | 72 69 76 61 6c 20 6f 66 |d (eg ar|rival of|
|000008a0| 20 4f 4f 42 20 64 61 74 | 61 20 29 0a 20 09 33 09 | OOB dat|a ). .3.|
|000008b0| 20 09 53 6f 63 6b 65 74 | 27 73 20 63 6f 6e 6e 65 | .Socket|'s conne|
|000008c0| 63 74 69 6f 6e 20 68 61 | 73 20 62 65 65 6e 20 62 |ction ha|s been b|
|000008d0| 72 6f 6b 65 6e 0a 0a 54 | 68 69 73 20 65 76 65 6e |roken..T|his even|
|000008e0| 74 20 63 61 6e 20 62 65 | 20 74 72 61 70 70 65 64 |t can be| trapped|
|000008f0| 20 61 6e 64 20 75 73 65 | 64 20 74 6f 20 6b 6e 6f | and use|d to kno|
|00000900| 77 20 77 68 65 6e 20 74 | 6f 20 72 65 61 64 20 64 |w when t|o read d|
|00000910| 61 74 61 20 66 72 6f 6d | 20 74 68 65 20 73 6f 63 |ata from| the soc|
|00000920| 6b 65 74 2c 20 61 6e 64 | 20 77 68 65 6e 20 61 20 |ket, and| when a |
|00000930| 63 6f 6e 6e 65 63 74 69 | 6f 6e 20 68 61 73 20 62 |connecti|on has b|
|00000940| 65 65 6e 20 63 6c 6f 73 | 65 64 2e 00 44 41 54 41 |een clos|ed..DATA|
|00000950| 6e 03 00 00 53 6f 63 6b | 65 74 20 45 72 72 6f 72 |n...Sock|et Error|
|00000960| 73 0a 7b 2a 7d 4e 61 6d | 65 7b 2a 7d 09 7b 2a 7d |s.{*}Nam|e{*}.{*}|
|00000970| 4e 75 6d 62 65 72 7b 2a | 7d 09 7b 2a 7d 45 78 70 |Number{*|}.{*}Exp|
|00000980| 6c 61 6e 61 74 69 6f 6e | 7b 2a 7d 0a 45 42 41 44 |lanation|{*}.EBAD|
|00000990| 46 09 39 09 49 6e 76 61 | 6c 69 64 20 73 6f 63 6b |F.9.Inva|lid sock|
|000009a0| 65 74 20 64 65 73 63 72 | 69 70 74 6f 72 20 67 69 |et descr|iptor gi|
|000009b0| 76 65 6e 0a 45 46 41 55 | 4c 54 09 31 34 09 42 75 |ven.EFAU|LT.14.Bu|
|000009c0| 66 66 65 72 20 69 73 20 | 69 6e 76 61 6c 69 64 20 |ffer is |invalid |
|000009d0| 6f 72 20 74 6f 6f 20 73 | 6d 61 6c 6c 0a 45 49 4e |or too s|mall.EIN|
|000009e0| 56 41 4c 09 32 32 09 49 | 6e 76 61 6c 69 64 20 61 |VAL.22.I|nvalid a|
|000009f0| 72 67 75 6d 65 6e 74 0a | 45 57 4f 55 4c 44 42 4c |rgument.|EWOULDBL|
|00000a00| 4f 43 4b 09 33 35 09 53 | 6f 63 6b 65 74 20 69 73 |OCK.35.S|ocket is|
|00000a10| 20 6d 61 72 6b 65 64 20 | 6e 6f 6e 2d 62 6c 6f 63 | marked |non-bloc|
|00000a20| 6b 69 6e 67 2c 20 61 6e | 64 20 74 68 69 73 20 6f |king, an|d this o|
|00000a30| 70 65 72 61 74 69 6f 6e | 20 77 6f 75 6c 64 20 6e |peration| would n|
|00000a40| 6f 72 6d 61 6c 6c 79 20 | 62 6c 6f 63 6b 0a 45 49 |ormally |block.EI|
|00000a50| 4e 50 52 4f 47 52 45 53 | 53 09 33 36 09 4f 70 65 |NPROGRES|S.36.Ope|
|00000a60| 72 61 74 69 6f 6e 20 6e | 6f 77 20 69 6e 20 70 72 |ration n|ow in pr|
|00000a70| 6f 67 72 65 73 73 0a 45 | 41 4c 52 45 41 44 59 09 |ogress.E|ALREADY.|
|00000a80| 33 37 09 4f 70 65 72 61 | 74 69 6f 6e 20 61 6c 72 |37.Opera|tion alr|
|00000a90| 65 61 64 79 20 69 6e 20 | 70 72 6f 67 72 65 73 73 |eady in |progress|
|00000aa0| 0a 45 4d 53 47 53 49 5a | 45 09 34 30 09 4d 65 73 |.EMSGSIZ|E.40.Mes|
|00000ab0| 73 61 67 65 20 74 6f 6f | 20 6c 6f 6e 67 0a 45 4e |sage too| long.EN|
|00000ac0| 4f 50 52 4f 54 4f 4f 50 | 54 09 34 32 09 4f 70 74 |OPROTOOP|T.42.Opt|
|00000ad0| 69 6f 6e 20 6e 6f 74 20 | 73 75 70 70 6f 72 74 65 |ion not |supporte|
|00000ae0| 64 20 62 79 20 70 72 6f | 74 6f 63 6f 6c 0a 45 50 |d by pro|tocol.EP|
|00000af0| 52 4f 54 4f 4e 4f 53 55 | 50 50 4f 52 54 09 34 33 |ROTONOSU|PPORT.43|
|00000b00| 09 50 72 6f 74 6f 63 6f | 6c 20 6e 6f 74 20 73 75 |.Protoco|l not su|
|00000b10| 70 70 6f 72 74 65 64 0a | 45 53 4f 43 4b 54 4e 4f |pported.|ESOCKTNO|
|00000b20| 53 55 50 50 4f 52 54 09 | 34 34 09 53 6f 63 6b 65 |SUPPORT.|44.Socke|
|00000b30| 74 20 74 79 70 65 20 6e | 6f 74 20 73 75 70 70 6f |t type n|ot suppo|
|00000b40| 72 74 65 64 0a 45 4f 50 | 4e 4f 54 53 55 50 50 09 |rted.EOP|NOTSUPP.|
|00000b50| 34 35 09 4f 70 65 72 61 | 74 69 6f 6e 20 6e 6f 74 |45.Opera|tion not|
|00000b60| 20 73 75 70 70 6f 72 74 | 65 64 0a 45 41 46 4e 4f | support|ed.EAFNO|
|00000b70| 53 55 50 50 4f 52 54 09 | 34 37 09 41 64 64 72 65 |SUPPORT.|47.Addre|
|00000b80| 73 73 20 66 61 6d 69 6c | 79 20 6e 6f 74 20 73 75 |ss famil|y not su|
|00000b90| 70 70 6f 72 74 65 64 0a | 45 41 44 44 52 49 4e 55 |pported.|EADDRINU|
|00000ba0| 53 45 09 34 38 09 41 64 | 64 72 65 73 73 20 61 6c |SE.48.Ad|dress al|
|00000bb0| 72 65 61 64 79 20 69 6e | 20 75 73 65 0a 45 4e 45 |ready in| use.ENE|
|00000bc0| 54 55 4e 52 45 41 43 48 | 09 35 31 09 4e 65 74 77 |TUNREACH|.51.Netw|
|00000bd0| 6f 72 6b 20 75 6e 72 65 | 61 63 68 61 62 6c 65 0a |ork unre|achable.|
|00000be0| 45 43 4f 4e 4e 52 45 53 | 45 54 09 35 34 09 43 6f |ECONNRES|ET.54.Co|
|00000bf0| 6e 6e 65 63 74 69 6f 6e | 20 72 65 73 65 74 20 62 |nnection| reset b|
|00000c00| 79 20 70 65 65 72 0a 45 | 4e 4f 42 55 46 53 09 35 |y peer.E|NOBUFS.5|
|00000c10| 35 09 4e 6f 20 62 75 66 | 66 65 72 20 73 70 61 63 |5.No buf|fer spac|
|00000c20| 65 20 61 76 61 69 6c 61 | 62 6c 65 0a 45 49 53 43 |e availa|ble.EISC|
|00000c30| 4f 4e 4e 09 35 36 09 53 | 6f 63 6b 65 74 20 69 73 |ONN.56.S|ocket is|
|00000c40| 20 61 6c 72 65 61 64 79 | 20 63 6f 6e 6e 65 63 74 | already| connect|
|00000c50| 65 64 0a 45 4e 4f 54 43 | 4f 4e 4e 09 35 37 09 53 |ed.ENOTC|ONN.57.S|
|00000c60| 6f 63 6b 65 74 20 69 73 | 20 6e 6f 74 20 63 6f 6e |ocket is| not con|
|00000c70| 6e 65 63 74 65 64 0a 45 | 43 4f 4e 4e 52 45 46 55 |nected.E|CONNREFU|
|00000c80| 53 45 44 09 36 31 09 43 | 6f 6e 6e 65 63 74 69 6f |SED.61.C|onnectio|
|00000c90| 6e 20 72 65 66 75 73 65 | 64 0a 45 48 4f 53 54 55 |n refuse|d.EHOSTU|
|00000ca0| 4e 52 45 41 43 48 09 36 | 35 09 48 6f 73 74 20 75 |NREACH.6|5.Host u|
|00000cb0| 6e 72 65 61 63 68 61 62 | 6c 65 00 00 44 41 54 41 |nreachab|le..DATA|
|00000cc0| 9b 04 00 00 53 6f 63 6b | 65 74 20 43 6f 6e 73 74 |....Sock|et Const|
|00000cd0| 61 6e 74 73 0a 7b 2a 7d | 4e 61 6d 65 7b 2a 7d 09 |ants.{*}|Name{*}.|
|00000ce0| 7b 2a 7d 56 61 6c 75 65 | 7b 2a 7d 09 7b 2a 7d 4e |{*}Value|{*}.{*}N|
|00000cf0| 61 6d 65 7b 2a 7d 09 7b | 2a 7d 56 61 6c 75 65 7b |ame{*}.{|*}Value{|
|00000d00| 2a 7d 0a 53 4f 43 4b 5f | 53 54 52 45 41 4d 09 31 |*}.SOCK_|STREAM.1|
|00000d10| 09 53 4f 5f 44 45 42 55 | 47 09 26 30 30 30 31 0a |.SO_DEBU|G.&0001.|
|00000d20| 53 4f 43 4b 5f 44 47 52 | 41 4d 09 32 09 53 4f 5f |SOCK_DGR|AM.2.SO_|
|00000d30| 41 43 43 45 50 54 43 4f | 4e 4e 09 26 30 30 30 32 |ACCEPTCO|NN.&0002|
|00000d40| 0a 53 4f 43 4b 5f 52 41 | 57 09 33 09 53 4f 5f 52 |.SOCK_RA|W.3.SO_R|
|00000d50| 45 55 53 45 41 44 44 52 | 09 26 30 30 30 34 0a 09 |EUSEADDR|.&0004..|
|00000d60| 20 09 53 4f 5f 4b 45 45 | 50 41 4c 49 56 45 09 26 | .SO_KEE|PALIVE.&|
|00000d70| 30 30 30 38 0a 50 46 5f | 49 4e 45 54 09 32 09 53 |0008.PF_|INET.2.S|
|00000d80| 4f 5f 44 4f 4e 54 52 4f | 55 54 45 09 26 30 30 31 |O_DONTRO|UTE.&001|
|00000d90| 30 0a 09 20 09 09 53 4f | 5f 42 52 4f 41 44 43 41 |0.. ..SO|_BROADCA|
|00000da0| 53 54 09 26 30 30 32 30 | 0a 41 46 5f 49 4e 45 54 |ST.&0020|.AF_INET|
|00000db0| 09 32 09 53 4f 5f 4c 49 | 4e 47 45 52 09 26 30 30 |.2.SO_LI|NGER.&00|
|00000dc0| 38 30 0a 09 20 09 09 53 | 4f 5f 4f 4f 42 49 4e 4c |80.. ..S|O_OOBINL|
|00000dd0| 49 4e 45 09 26 30 31 30 | 30 0a 4d 53 47 5f 4f 4f |INE.&010|0.MSG_OO|
|00000de0| 42 09 26 30 31 09 53 4f | 5f 53 4e 44 42 55 46 09 |B.&01.SO|_SNDBUF.|
|00000df0| 26 31 30 30 31 0a 4d 53 | 47 5f 50 45 45 4b 09 26 |&1001.MS|G_PEEK.&|
|00000e00| 30 32 09 53 4f 5f 52 43 | 56 42 55 46 09 26 31 30 |02.SO_RC|VBUF.&10|
|00000e10| 30 32 0a 4d 53 47 5f 45 | 4f 52 09 26 30 38 09 53 |02.MSG_E|OR.&08.S|
|00000e20| 4f 5f 53 4e 44 4c 4f 57 | 41 54 09 26 31 30 30 33 |O_SNDLOW|AT.&1003|
|00000e30| 0a 4d 53 47 5f 54 52 55 | 4e 43 09 26 31 30 09 53 |.MSG_TRU|NC.&10.S|
|00000e40| 4f 5f 52 43 56 4c 4f 57 | 41 54 09 26 31 30 30 34 |O_RCVLOW|AT.&1004|
|00000e50| 0a 4d 53 47 5f 57 41 49 | 54 41 4c 4c 09 26 34 30 |.MSG_WAI|TALL.&40|
|00000e60| 09 53 4f 5f 53 4e 44 54 | 49 4d 45 4f 09 26 31 30 |.SO_SNDT|IMEO.&10|
|00000e70| 30 35 0a 4d 53 47 5f 44 | 4f 4e 54 57 41 49 54 09 |05.MSG_D|ONTWAIT.|
|00000e80| 26 38 30 09 53 4f 5f 52 | 43 56 54 49 4d 45 4f 09 |&80.SO_R|CVTIMEO.|
|00000e90| 26 31 30 30 36 0a 09 20 | 09 53 4f 5f 45 52 52 4f |&1006.. |.SO_ERRO|
|00000ea0| 52 09 26 31 30 30 37 0a | 53 4f 4c 5f 53 4f 43 4b |R.&1007.|SOL_SOCK|
|00000eb0| 45 54 09 26 46 46 46 46 | 09 53 4f 5f 54 59 50 45 |ET.&FFFF|.SO_TYPE|
|00000ec0| 09 26 31 30 30 38 0a 0a | 49 50 5f 4f 50 54 49 4f |.&1008..|IP_OPTIO|
|00000ed0| 4e 53 09 31 09 53 49 4f | 43 53 49 46 41 44 44 52 |NS.1.SIO|CSIFADDR|
|00000ee0| 09 26 38 30 32 30 36 39 | 30 43 0a 49 50 5f 48 44 |.&802069|0C.IP_HD|
|00000ef0| 52 49 4e 43 4c 09 32 09 | 4f 53 49 4f 43 47 49 46 |RINCL.2.|OSIOCGIF|
|00000f00| 41 44 44 52 09 26 43 30 | 32 30 36 39 30 44 0a 49 |ADDR.&C0|20690D.I|
|00000f10| 50 5f 54 4f 53 09 33 09 | 53 49 4f 43 47 49 46 41 |P_TOS.3.|SIOCGIFA|
|00000f20| 44 44 52 09 26 43 30 32 | 30 36 39 32 31 0a 49 50 |DDR.&C02|06921.IP|
|00000f30| 5f 54 54 4c 09 34 09 53 | 49 4f 43 53 49 46 44 53 |_TTL.4.S|IOCSIFDS|
|00000f40| 54 41 44 44 52 09 26 38 | 30 32 30 36 39 30 45 0a |TADDR.&8|020690E.|
|00000f50| 09 20 09 4f 53 49 4f 43 | 47 49 46 44 53 54 41 44 |. .OSIOC|GIFDSTAD|
|00000f60| 44 52 09 26 43 30 32 30 | 36 39 30 46 0a 54 43 50 |DR.&C020|690F.TCP|
|00000f70| 5f 4e 4f 44 45 4c 41 59 | 09 31 09 53 49 4f 43 47 |_NODELAY|.1.SIOCG|
|00000f80| 49 46 44 53 54 41 44 44 | 52 09 26 43 30 32 30 36 |IFDSTADD|R.&C0206|
|00000f90| 39 32 32 0a 54 43 50 5f | 4d 41 58 53 45 47 09 32 |922.TCP_|MAXSEG.2|
|00000fa0| 09 53 49 4f 43 53 49 46 | 46 4c 41 47 53 09 26 38 |.SIOCSIF|FLAGS.&8|
|00000fb0| 30 32 30 36 39 31 30 0a | 09 20 09 53 49 4f 43 47 |0206910.|. .SIOCG|
|00000fc0| 49 46 46 4c 41 47 53 09 | 26 43 30 32 30 36 39 31 |IFFLAGS.|&C020691|
|00000fd0| 31 0a 46 49 4f 41 53 59 | 4e 43 09 26 38 30 30 34 |1.FIOASY|NC.&8004|
|00000fe0| 36 36 37 44 09 4f 53 49 | 4f 43 47 49 46 42 52 44 |667D.OSI|OCGIFBRD|
|00000ff0| 41 44 44 52 09 26 43 30 | 32 30 36 39 31 32 0a 46 |ADDR.&C0|206912.F|
|00001000| 49 4f 4e 42 49 4f 09 26 | 38 30 30 34 36 36 37 45 |IONBIO.&|8004667E|
|00001010| 09 53 49 4f 43 47 49 46 | 42 52 44 41 44 44 52 09 |.SIOCGIF|BRDADDR.|
|00001020| 26 43 30 32 30 36 39 32 | 33 0a 46 49 4f 4e 52 45 |&C020692|3.FIONRE|
|00001030| 41 44 09 26 34 30 30 34 | 36 36 37 46 09 53 49 4f |AD.&4004|667F.SIO|
|00001040| 43 53 49 46 42 52 44 41 | 44 44 52 09 26 38 30 32 |CSIFBRDA|DDR.&802|
|00001050| 30 36 39 31 33 0a 09 20 | 09 4f 53 49 4f 43 47 49 |06913.. |.OSIOCGI|
|00001060| 46 43 4f 4e 46 09 26 43 | 30 32 30 36 39 31 34 0a |FCONF.&C|0206914.|
|00001070| 53 49 4f 43 41 54 4d 41 | 52 4b 09 26 38 30 30 34 |SIOCATMA|RK.&8004|
|00001080| 37 33 30 37 09 53 49 4f | 43 47 49 46 43 4f 4e 46 |7307.SIO|CGIFCONF|
|00001090| 09 26 43 30 32 30 36 39 | 32 34 0a 09 20 09 4f 53 |.&C02069|24.. .OS|
|000010a0| 49 4f 43 47 49 46 4e 45 | 54 4d 41 53 4b 09 26 43 |IOCGIFNE|TMASK.&C|
|000010b0| 30 32 30 36 39 31 35 0a | 09 20 09 53 49 4f 43 47 |0206915.|. .SIOCG|
|000010c0| 49 46 4e 45 54 4d 41 53 | 4b 09 26 43 30 32 30 36 |IFNETMAS|K.&C0206|
|000010d0| 39 32 35 0a 09 20 09 53 | 49 4f 43 53 49 46 4e 45 |925.. .S|IOCSIFNE|
|000010e0| 54 4d 41 53 4b 09 26 38 | 30 32 30 36 39 31 36 0a |TMASK.&8|0206916.|
|000010f0| 09 20 09 53 49 4f 43 47 | 49 46 4d 45 54 52 49 43 |. .SIOCG|IFMETRIC|
|00001100| 09 26 43 30 32 30 36 39 | 31 37 0a 09 20 09 53 49 |.&C02069|17.. .SI|
|00001110| 4f 43 53 49 46 4d 45 54 | 52 49 43 09 26 38 30 32 |OCSIFMET|RIC.&802|
|00001120| 30 36 39 31 38 0a 09 20 | 09 53 49 4f 43 44 49 46 |06918.. |.SIOCDIF|
|00001130| 41 44 44 52 09 26 38 30 | 32 30 36 39 31 39 0a 09 |ADDR.&80|206919..|
|00001140| 20 09 53 49 4f 43 41 49 | 46 41 44 44 52 09 26 38 | .SIOCAI|FADDR.&8|
|00001150| 30 32 30 36 39 32 30 00 | 44 49 52 24 6c 03 00 00 |0206920.|DIR$l...|
|00001160| 6c 03 00 00 c4 14 00 00 | 46 ff ff ff 38 c9 03 d8 |l.......|F...8...|
|00001170| ad 03 00 00 13 00 00 00 | 00 00 00 00 41 63 63 65 |........|....Acce|
|00001180| 70 74 00 00 74 18 00 00 | 46 ff ff ff 4a ff 61 ce |pt..t...|F...J.a.|
|00001190| dd 02 00 00 13 00 00 00 | 00 00 00 00 42 69 6e 64 |........|....Bind|
|000011a0| 00 00 00 00 54 1b 00 00 | 46 ff ff ff 92 cc 03 d8 |....T...|F.......|
|000011b0| 36 01 00 00 13 00 00 00 | 00 00 00 00 43 6c 6f 73 |6.......|....Clos|
|000011c0| 65 00 00 00 8c 1c 00 00 | 46 ff ff ff 99 cf 03 d8 |e.......|F.......|
|000011d0| 11 03 00 00 13 00 00 00 | 00 00 00 00 43 6f 6e 6e |........|....Conn|
|000011e0| 65 63 74 00 a0 1f 00 00 | 46 ff ff ff e4 d1 03 d8 |ect.....|F.......|
|000011f0| 2b 05 00 00 13 00 00 00 | 00 00 00 00 43 72 65 61 |+.......|....Crea|
|00001200| 74 00 00 00 cc 24 00 00 | 46 ff ff ff ee b6 61 ce |t....$..|F.....a.|
|00001210| 33 01 00 00 13 00 00 00 | 00 00 00 00 47 65 74 70 |3.......|....Getp|
|00001220| 65 65 72 6e 61 6d 65 00 | 00 26 00 00 46 ff ff ff |eername.|.&..F...|
|00001230| 50 c2 61 ce 35 01 00 00 | 13 00 00 00 00 00 00 00 |P.a.5...|........|
|00001240| 47 65 74 73 6f 63 6b 6e | 61 6d 65 00 38 27 00 00 |Getsockn|ame.8'..|
|00001250| 46 ff ff ff 2c d4 03 d8 | 65 02 00 00 13 00 00 00 |F...,...|e.......|
|00001260| 00 00 00 00 47 65 74 73 | 6f 63 6b 6f 70 74 00 00 |....Gets|ockopt..|
|00001270| a0 29 00 00 46 ff ff ff | 92 a5 62 ce d1 00 00 00 |.)..F...|..b.....|
|00001280| 13 00 00 00 00 00 00 00 | 47 65 74 74 73 69 7a 65 |........|Gettsize|
|00001290| 00 00 00 00 74 2a 00 00 | 46 ff ff ff 3b 35 62 ce |....t*..|F...;5b.|
|000012a0| 92 05 00 00 13 00 00 00 | 00 00 00 00 49 6f 63 74 |........|....Ioct|
|000012b0| 6c 00 00 00 08 30 00 00 | 46 ff ff ff 5a fd 5f ce |l....0..|F...Z._.|
|000012c0| 75 01 00 00 13 00 00 00 | 00 00 00 00 4c 69 73 74 |u.......|....List|
|000012d0| 65 6e 00 00 80 31 00 00 | 46 ff ff ff 2e d7 03 d8 |en...1..|F.......|
|000012e0| 40 01 00 00 13 00 00 00 | 00 00 00 00 52 65 61 64 |@.......|....Read|
|000012f0| 00 00 00 00 c0 32 00 00 | 46 ff ff ff 36 da 03 d8 |.....2..|F...6...|
|00001300| 77 01 00 00 13 00 00 00 | 00 00 00 00 52 65 61 64 |w.......|....Read|
|00001310| 76 00 00 00 38 34 00 00 | 46 ff ff ff 68 cb 72 d0 |v...84..|F...h.r.|
|00001320| 53 04 00 00 13 00 00 00 | 00 00 00 00 52 65 63 76 |S.......|....Recv|
|00001330| 00 00 00 00 8c 38 00 00 | 46 ff ff ff 1d de 03 d8 |.....8..|F.......|
|00001340| d2 01 00 00 13 00 00 00 | 00 00 00 00 52 65 63 76 |........|....Recv|
|00001350| 66 72 6f 6d 00 00 00 00 | 60 3a 00 00 46 ff ff ff |from....|`:..F...|
|00001360| 23 e1 03 d8 f9 03 00 00 | 13 00 00 00 00 00 00 00 |#.......|........|
|00001370| 52 65 63 76 6d 73 67 00 | 5c 3e 00 00 46 ff ff ff |Recvmsg.|\>..F...|
|00001380| 9b f6 61 ce a3 05 00 00 | 13 00 00 00 00 00 00 00 |..a.....|........|
|00001390| 53 65 6c 65 63 74 00 00 | 00 44 00 00 46 ff ff ff |Select..|.D..F...|
|000013a0| 61 8f 60 ce 51 03 00 00 | 13 00 00 00 00 00 00 00 |a.`.Q...|........|
|000013b0| 53 65 6e 64 00 00 00 00 | 54 47 00 00 46 ff ff ff |Send....|TG..F...|
|000013c0| 0f e5 03 d8 ae 01 00 00 | 13 00 00 00 00 00 00 00 |........|........|
|000013d0| 53 65 6e 64 6d 73 67 00 | 04 49 00 00 46 ff ff ff |Sendmsg.|.I..F...|
|000013e0| e0 e9 03 d8 bc 02 00 00 | 13 00 00 00 00 00 00 00 |........|........|
|000013f0| 53 65 6e 64 74 6f 00 00 | c0 4b 00 00 46 ff ff ff |Sendto..|.K..F...|
|00001400| 71 ac 62 ce 4c 00 00 00 | 13 00 00 00 00 00 00 00 |q.b.L...|........|
|00001410| 53 65 6e 64 74 6f 73 6d | 00 00 00 00 0c 4c 00 00 |Sendtosm|.....L..|
|00001420| 46 ff ff ff ff ef 03 d8 | 8d 0c 00 00 13 00 00 00 |F.......|........|
|00001430| 00 00 00 00 53 65 74 73 | 6f 63 6b 6f 70 74 00 00 |....Sets|ockopt..|
|00001440| 9c 58 00 00 46 ff ff ff | 1f ed 60 ce 8c 01 00 00 |.X..F...|..`.....|
|00001450| 13 00 00 00 00 00 00 00 | 53 68 75 74 64 6f 77 6e |........|Shutdown|
|00001460| 00 00 00 00 28 5a 00 00 | 46 ff ff ff 3f 68 62 ce |....(Z..|F...?hb.|
|00001470| 50 00 00 00 13 00 00 00 | 00 00 00 00 53 74 61 74 |P.......|....Stat|
|00001480| 00 00 00 00 78 5a 00 00 | 46 ff ff ff 8a f3 03 d8 |....xZ..|F.......|
|00001490| 33 01 00 00 13 00 00 00 | 00 00 00 00 57 72 69 74 |3.......|....Writ|
|000014a0| 65 00 00 00 ac 5b 00 00 | 46 ff ff ff c7 f6 03 d8 |e....[..|F.......|
|000014b0| 7b 01 00 00 13 00 00 00 | 00 00 00 00 57 72 69 74 |{.......|....Writ|
|000014c0| 65 76 00 00 44 41 54 41 | ad 03 00 00 53 6f 63 6b |ev..DATA|....Sock|
|000014d0| 65 74 5f 41 63 63 65 70 | 74 20 20 28 26 34 31 32 |et_Accep|t (&412|
|000014e0| 30 33 29 20 20 61 63 63 | 65 70 74 28 29 0a 45 6e |03) acc|ept().En|
|000014f0| 74 72 79 0a 20 09 52 30 | 20 3d 20 53 6f 63 6b 65 |try. .R0| = Socke|
|00001500| 74 20 64 65 73 63 72 69 | 70 74 6f 72 20 6f 66 20 |t descri|ptor of |
|00001510| 6c 69 73 74 65 6e 69 6e | 67 20 73 6f 63 6b 65 74 |listenin|g socket|
|00001520| 0a 20 09 52 31 20 3d 20 | 50 6f 69 6e 74 65 72 20 |. .R1 = |Pointer |
|00001530| 74 6f 20 61 64 64 72 65 | 73 73 20 74 6f 20 62 65 |to addre|ss to be|
|00001540| 20 66 69 6c 6c 65 64 20 | 69 6e 0a 20 09 52 32 20 | filled |in. .R2 |
|00001550| 3d 20 50 6f 69 6e 74 65 | 72 20 74 6f 20 77 6f 72 |= Pointe|r to wor|
|00001560| 64 20 67 69 76 69 6e 67 | 20 74 68 65 20 73 69 7a |d giving| the siz|
|00001570| 65 20 6f 66 20 74 68 65 | 20 61 64 64 72 65 73 73 |e of the| address|
|00001580| 20 62 6c 6f 63 6b 0a 45 | 78 69 74 0a 20 09 52 30 | block.E|xit. .R0|
|00001590| 20 3d 20 53 6f 63 6b 65 | 74 20 64 65 73 63 72 69 | = Socke|t descri|
|000015a0| 70 74 6f 72 20 66 6f 72 | 20 6e 65 77 20 63 6f 6e |ptor for| new con|
|000015b0| 6e 65 63 74 69 6f 6e 0a | 0a 54 68 69 73 20 63 61 |nection.|.This ca|
|000015c0| 6c 6c 20 69 73 20 75 73 | 65 64 20 74 6f 20 61 63 |ll is us|ed to ac|
|000015d0| 63 65 70 74 20 63 6f 6e | 6e 65 63 74 69 6f 6e 73 |cept con|nections|
|000015e0| 20 66 72 6f 6d 20 73 65 | 72 76 65 72 20 73 6f 63 | from se|rver soc|
|000015f0| 6b 65 74 73 20 74 68 61 | 74 20 68 61 76 65 20 62 |kets tha|t have b|
|00001600| 65 65 6e 20 74 6f 6c 64 | 20 74 6f 20 6c 69 73 74 |een told| to list|
|00001610| 65 6e 20 66 6f 72 20 6e | 65 77 20 63 6f 6e 6e 65 |en for n|ew conne|
|00001620| 63 74 69 6f 6e 73 2e 20 | 41 20 6e 65 77 20 73 6f |ctions. |A new so|
|00001630| 63 6b 65 74 20 77 69 6c | 6c 20 62 65 20 63 72 65 |cket wil|l be cre|
|00001640| 61 74 65 64 20 66 6f 72 | 20 65 61 63 68 20 69 6e |ated for| each in|
|00001650| 63 6f 6d 69 6e 67 20 63 | 6f 6e 6e 65 63 74 69 6f |coming c|onnectio|
|00001660| 6e 2c 20 61 6e 64 20 74 | 68 69 73 20 63 61 6c 6c |n, and t|his call|
|00001670| 20 69 6e 20 74 68 65 6e | 20 75 73 65 64 20 74 6f | in then| used to|
|00001680| 20 6f 62 74 61 69 6e 20 | 74 68 65 20 64 65 73 63 | obtain |the desc|
|00001690| 72 69 70 74 6f 72 20 66 | 6f 72 20 74 68 65 20 6e |riptor f|or the n|
|000016a0| 65 78 74 20 70 65 6e 64 | 69 6e 67 20 63 6f 6e 6e |ext pend|ing conn|
|000016b0| 65 63 74 69 6f 6e 2e 0a | 0a 54 68 65 20 61 64 64 |ection..|.The add|
|000016c0| 72 65 73 73 20 6f 66 20 | 74 68 65 20 68 6f 73 74 |ress of |the host|
|000016d0| 20 77 68 69 63 68 20 69 | 6e 69 74 69 61 74 65 64 | which i|nitiated|
|000016e0| 20 74 68 65 20 72 65 74 | 75 72 6e 65 64 20 63 6f | the ret|urned co|
|000016f0| 6e 6e 65 63 74 69 6f 6e | 20 77 69 6c 6c 20 61 6c |nnection| will al|
|00001700| 73 6f 20 62 65 20 72 65 | 74 75 72 6e 65 64 2c 20 |so be re|turned, |
|00001710| 69 6e 20 74 68 65 20 73 | 75 70 70 6c 69 65 64 20 |in the s|upplied |
|00001720| 61 64 64 72 65 73 73 20 | 62 6c 6f 63 6b 2e 20 54 |address |block. T|
|00001730| 68 69 73 20 62 6c 6f 63 | 6b 20 69 73 20 69 6e 20 |his bloc|k is in |
|00001740| 74 68 65 20 73 61 6d 65 | 20 66 6f 72 6d 61 74 20 |the same| format |
|00001750| 61 73 20 74 68 61 74 20 | 67 69 76 65 6e 20 74 6f |as that |given to|
|00001760| 20 3c 53 6f 63 6b 65 74 | 5f 42 69 6e 64 3e 2e 0a | <Socket|_Bind>..|
|00001770| 0a 49 66 20 74 68 65 72 | 65 20 61 72 65 20 6e 6f |.If ther|e are no|
|00001780| 20 63 6f 6e 6e 65 63 74 | 69 6f 6e 73 20 77 61 69 | connect|ions wai|
|00001790| 74 69 6e 67 20 74 6f 20 | 62 65 20 61 63 63 65 70 |ting to |be accep|
|000017a0| 74 65 64 2c 20 74 68 69 | 73 20 63 61 6c 6c 20 77 |ted, thi|s call w|
|000017b0| 69 6c 6c 20 62 6c 6f 63 | 6b 20 75 6e 74 69 6c 20 |ill bloc|k until |
|000017c0| 61 20 63 6f 6e 6e 65 63 | 74 69 6f 6e 20 69 73 20 |a connec|tion is |
|000017d0| 61 76 61 69 6c 61 62 6c | 65 20 74 6f 20 62 65 20 |availabl|e to be |
|000017e0| 72 65 74 75 72 6e 65 64 | 2c 20 75 6e 6c 65 73 73 |returned|, unless|
|000017f0| 20 74 68 65 20 73 6f 63 | 6b 65 74 20 68 61 73 20 | the soc|ket has |
|00001800| 62 65 65 6e 20 6d 61 72 | 6b 65 64 20 61 73 20 6e |been mar|ked as n|
|00001810| 6f 6e 2d 62 6c 6f 63 6b | 69 6e 67 20 75 73 69 6e |on-block|ing usin|
|00001820| 67 20 3c 53 6f 63 6b 65 | 74 5f 49 6f 63 74 6c 3e |g <Socke|t_Ioctl>|
|00001830| 2c 20 69 6e 20 77 68 69 | 63 68 20 63 61 73 65 20 |, in whi|ch case |
|00001840| 74 68 65 20 65 72 72 6f | 72 20 3c 45 57 4f 55 4c |the erro|r <EWOUL|
|00001850| 44 42 4c 4f 43 4b 3d 3e | 65 72 72 6f 72 73 3e 20 |DBLOCK=>|errors> |
|00001860| 77 69 6c 6c 20 62 65 20 | 72 65 74 75 72 6e 65 64 |will be |returned|
|00001870| 2e 00 00 00 44 41 54 41 | dd 02 00 00 53 6f 63 6b |....DATA|....Sock|
|00001880| 65 74 5f 42 69 6e 64 20 | 20 28 26 34 31 32 30 31 |et_Bind | (&41201|
|00001890| 29 20 20 62 69 6e 64 28 | 29 0a 45 6e 74 72 79 0a |) bind(|).Entry.|
|000018a0| 20 09 52 30 20 3d 20 53 | 6f 63 6b 65 74 20 64 65 | .R0 = S|ocket de|
|000018b0| 73 63 72 69 70 74 6f 72 | 0a 20 09 52 31 20 3d 20 |scriptor|. .R1 = |
|000018c0| 50 6f 69 6e 74 65 72 20 | 74 6f 20 6c 6f 63 61 6c |Pointer |to local|
|000018d0| 20 61 64 64 72 65 73 73 | 20 74 6f 20 62 69 6e 64 | address| to bind|
|000018e0| 20 73 6f 63 6b 65 74 20 | 74 6f 0a 20 09 52 32 20 | socket |to. .R2 |
|000018f0| 3d 20 53 69 7a 65 20 6f | 66 20 6c 6f 63 61 6c 20 |= Size o|f local |
|00001900| 61 64 64 72 65 73 73 0a | 45 78 69 74 0a 20 09 52 |address.|Exit. .R|
|00001910| 30 20 63 6f 72 72 75 70 | 74 65 64 0a 0a 54 68 69 |0 corrup|ted..Thi|
|00001920| 73 20 63 61 6c 6c 20 62 | 69 6e 64 73 20 61 20 73 |s call b|inds a s|
|00001930| 6f 63 6b 65 74 20 74 6f | 20 61 20 73 70 65 63 69 |ocket to| a speci|
|00001940| 66 69 65 64 20 6c 6f 63 | 61 6c 20 61 64 64 72 65 |fied loc|al addre|
|00001950| 73 73 2e 20 54 68 65 20 | 66 6f 72 6d 61 74 20 6f |ss. The |format o|
|00001960| 66 20 74 68 65 20 61 64 | 64 72 65 73 73 20 28 66 |f the ad|dress (f|
|00001970| 6f 72 20 49 6e 74 65 72 | 6e 65 74 20 61 64 64 72 |or Inter|net addr|
|00001980| 65 73 73 65 73 29 20 69 | 73 3a 0a 0a 20 09 52 31 |esses) i|s:.. .R1|
|00001990| 09 2b 20 30 20 3d 20 41 | 64 64 72 65 73 73 20 66 |.+ 0 = A|ddress f|
|000019a0| 61 6d 69 6c 79 0a 20 09 | 20 09 2b 20 32 20 3d 20 |amily. .| .+ 2 = |
|000019b0| 50 6f 72 74 20 6e 75 6d | 62 65 72 0a 20 09 20 09 |Port num|ber. . .|
|000019c0| 2b 20 34 20 3d 20 49 50 | 20 61 64 64 72 65 73 73 |+ 4 = IP| address|
|000019d0| 0a 20 09 20 09 2b 20 38 | 20 3d 20 52 65 73 65 72 |. . .+ 8| = Reser|
|000019e0| 76 65 64 20 28 73 68 6f | 75 6c 64 20 62 65 20 7a |ved (sho|uld be z|
|000019f0| 65 72 6f 29 0a 0a 54 68 | 65 20 61 64 64 72 65 73 |ero)..Th|e addres|
|00001a00| 73 20 66 61 6d 69 6c 79 | 20 69 73 20 61 6c 77 61 |s family| is alwa|
|00001a10| 79 73 20 3c 41 46 5f 49 | 4e 45 54 3d 3e 63 6f 6e |ys <AF_I|NET=>con|
|00001a20| 73 74 61 6e 74 73 3e 20 | 66 6f 72 20 69 6e 74 65 |stants> |for inte|
|00001a30| 72 6e 65 74 20 61 64 64 | 72 65 73 73 65 73 2e 20 |rnet add|resses. |
|00001a40| 54 68 65 20 72 65 73 65 | 72 76 65 64 20 70 6f 72 |The rese|rved por|
|00001a50| 74 69 6f 6e 20 6f 66 20 | 74 68 65 20 61 64 64 72 |tion of |the addr|
|00001a60| 65 73 73 20 63 61 6e 20 | 62 65 20 6f 6d 69 74 74 |ess can |be omitt|
|00001a70| 65 64 2c 20 70 72 6f 76 | 69 64 65 64 20 74 68 61 |ed, prov|ided tha|
|00001a80| 74 20 74 68 65 20 61 64 | 64 72 65 73 73 20 73 69 |t the ad|dress si|
|00001a90| 7a 65 20 69 73 20 70 61 | 73 73 65 64 20 63 6f 72 |ze is pa|ssed cor|
|00001aa0| 72 65 63 74 6c 79 20 74 | 6f 20 69 6e 64 69 63 61 |rectly t|o indica|
|00001ab0| 74 65 20 74 68 69 73 2e | 0a 0a 4e 6f 74 65 20 74 |te this.|..Note t|
|00001ac0| 68 61 74 20 74 68 65 20 | 70 6f 72 74 20 6e 75 6d |hat the |port num|
|00001ad0| 62 65 72 20 61 6e 64 20 | 49 50 20 61 64 64 72 65 |ber and |IP addre|
|00001ae0| 73 73 20 6e 65 65 64 20 | 74 6f 20 62 65 20 69 6e |ss need |to be in|
|00001af0| 20 6e 65 74 77 6f 72 6b | 20 62 79 74 65 20 6f 72 | network| byte or|
|00001b00| 64 65 72 2c 20 77 68 69 | 63 68 20 69 73 20 74 68 |der, whi|ch is th|
|00001b10| 65 20 72 65 76 65 72 73 | 65 20 6f 66 20 74 68 65 |e revers|e of the|
|00001b20| 20 6e 6f 72 6d 61 6c 20 | 62 79 74 65 20 6f 72 64 | normal |byte ord|
|00001b30| 65 72 20 6f 6e 20 61 6c | 6c 20 63 75 72 72 65 6e |er on al|l curren|
|00001b40| 74 20 41 63 6f 72 6e 20 | 6d 61 63 68 69 6e 65 73 |t Acorn |machines|
|00001b50| 2e 00 00 00 44 41 54 41 | 36 01 00 00 53 6f 63 6b |....DATA|6...Sock|
|00001b60| 65 74 5f 43 6c 6f 73 65 | 20 20 28 26 34 31 32 31 |et_Close| (&4121|
|00001b70| 30 29 20 20 63 6c 6f 73 | 65 28 29 0a 45 6e 74 72 |0) clos|e().Entr|
|00001b80| 79 0a 20 09 52 30 20 3d | 20 53 6f 63 6b 65 74 20 |y. .R0 =| Socket |
|00001b90| 64 65 73 63 72 69 70 74 | 6f 72 0a 45 78 69 74 0a |descript|or.Exit.|
|00001ba0| 20 09 52 30 20 63 6f 72 | 72 75 70 74 65 64 0a 0a | .R0 cor|rupted..|
|00001bb0| 43 6c 6f 73 65 20 61 20 | 73 6f 63 6b 65 74 2c 20 |Close a |socket, |
|00001bc0| 66 72 65 65 69 6e 67 20 | 74 68 65 20 64 65 73 63 |freeing |the desc|
|00001bd0| 72 69 70 74 6f 72 20 66 | 6f 72 20 72 65 75 73 65 |riptor f|or reuse|
|00001be0| 2e 20 46 6f 72 20 73 74 | 72 65 61 6d 20 73 6f 63 |. For st|ream soc|
|00001bf0| 6b 65 74 73 2c 20 74 68 | 69 73 20 69 73 20 72 6f |kets, th|is is ro|
|00001c00| 75 67 68 6c 79 20 65 71 | 75 69 76 61 6c 65 6e 74 |ughly eq|uivalent|
|00001c10| 20 74 6f 20 63 61 6c 6c | 69 6e 67 20 3c 53 6f 63 | to call|ing <Soc|
|00001c20| 6b 65 74 5f 53 68 75 74 | 64 6f 77 6e 3e 20 77 69 |ket_Shut|down> wi|
|00001c30| 74 68 20 61 20 74 79 70 | 65 20 63 6f 64 65 20 6f |th a typ|e code o|
|00001c40| 66 20 32 2c 20 77 68 69 | 6c 73 74 20 66 6f 72 20 |f 2, whi|lst for |
|00001c50| 64 61 74 61 67 72 61 6d | 20 73 6f 63 6b 65 74 73 |datagram| sockets|
|00001c60| 20 74 68 69 73 20 63 61 | 6c 6c 20 69 6d 6d 65 64 | this ca|ll immed|
|00001c70| 69 61 74 65 6c 79 20 64 | 65 6c 65 74 65 73 20 74 |iately d|eletes t|
|00001c80| 68 65 20 73 6f 63 6b 65 | 74 2e 00 00 44 41 54 41 |he socke|t...DATA|
|00001c90| 11 03 00 00 53 6f 63 6b | 65 74 5f 43 6f 6e 6e 65 |....Sock|et_Conne|
|00001ca0| 63 74 20 20 28 26 34 31 | 32 30 34 29 20 20 63 6f |ct (&41|204) co|
|00001cb0| 6e 6e 65 63 74 28 29 0a | 45 6e 74 72 79 0a 20 09 |nnect().|Entry. .|
|00001cc0| 52 30 20 3d 20 53 6f 63 | 6b 65 74 20 64 65 73 63 |R0 = Soc|ket desc|
|00001cd0| 72 69 70 74 6f 72 0a 20 | 09 52 31 20 3d 20 50 6f |riptor. |.R1 = Po|
|00001ce0| 69 6e 74 65 72 20 74 6f | 20 61 64 64 72 65 73 73 |inter to| address|
|00001cf0| 20 6f 66 20 72 65 6d 6f | 74 65 20 68 6f 73 74 0a | of remo|te host.|
|00001d00| 20 09 52 32 20 3d 20 53 | 69 7a 65 20 6f 66 20 73 | .R2 = S|ize of s|
|00001d10| 75 70 70 6c 69 65 64 20 | 61 64 64 72 65 73 73 20 |upplied |address |
|00001d20| 62 6c 6f 63 6b 0a 45 78 | 69 74 0a 20 09 52 30 20 |block.Ex|it. .R0 |
|00001d30| 63 6f 72 72 75 70 74 65 | 64 0a 0a 54 68 69 73 20 |corrupte|d..This |
|00001d40| 63 61 6c 6c 20 69 6e 69 | 74 69 61 74 65 73 20 61 |call ini|tiates a|
|00001d50| 20 63 6f 6e 6e 65 63 74 | 69 6f 6e 20 66 72 6f 6d | connect|ion from|
|00001d60| 20 74 68 65 20 73 70 65 | 63 69 66 69 65 64 20 73 | the spe|cified s|
|00001d70| 6f 63 6b 65 74 20 74 6f | 20 61 20 67 69 76 65 6e |ocket to| a given|
|00001d80| 20 61 64 64 72 65 73 73 | 20 6f 6e 20 61 6e 6f 74 | address| on anot|
|00001d90| 68 65 72 20 68 6f 73 74 | 2e 20 57 68 65 6e 20 75 |her host|. When u|
|00001da0| 73 65 64 20 6f 6e 20 61 | 20 72 61 77 20 6f 72 20 |sed on a| raw or |
|00001db0| 64 61 74 61 67 72 61 6d | 20 73 6f 63 6b 65 74 2c |datagram| socket,|
|00001dc0| 20 74 68 69 73 20 77 69 | 6c 6c 20 73 69 6d 70 6c | this wi|ll simpl|
|00001dd0| 79 20 66 69 78 20 74 68 | 65 20 72 65 6d 6f 74 65 |y fix th|e remote|
|00001de0| 20 61 64 64 72 65 73 73 | 20 66 6f 72 20 66 75 74 | address| for fut|
|00001df0| 75 72 65 20 63 61 6c 6c | 73 20 74 6f 20 3c 53 6f |ure call|s to <So|
|00001e00| 63 6b 65 74 5f 53 65 6e | 64 3e 2c 20 61 6e 64 20 |cket_Sen|d>, and |
|00001e10| 74 68 69 73 20 72 65 6d | 6f 74 65 20 61 64 64 72 |this rem|ote addr|
|00001e20| 65 73 73 20 63 61 6e 20 | 62 65 20 63 68 61 6e 67 |ess can |be chang|
|00001e30| 65 64 20 62 79 20 63 61 | 6c 6c 69 6e 67 20 74 68 |ed by ca|lling th|
|00001e40| 69 73 20 72 6f 75 74 69 | 6e 65 20 61 67 61 69 6e |is routi|ne again|
|00001e50| 2e 0a 0a 46 6f 72 20 73 | 74 72 65 61 6d 20 73 6f |...For s|tream so|
|00001e60| 63 6b 65 74 73 2c 20 46 | 72 65 65 4e 65 74 20 77 |ckets, F|reeNet w|
|00001e70| 69 6c 6c 20 61 74 74 65 | 6d 70 74 20 74 6f 20 6d |ill atte|mpt to m|
|00001e80| 61 6b 65 20 61 20 63 6f | 6e 6e 65 63 74 69 6f 6e |ake a co|nnection|
|00001e90| 20 74 6f 20 74 68 65 20 | 73 70 65 63 69 66 69 65 | to the |specifie|
|00001ea0| 64 20 61 64 64 72 65 73 | 73 2c 20 61 6e 64 20 77 |d addres|s, and w|
|00001eb0| 69 6c 6c 20 62 6c 6f 63 | 6b 20 75 6e 74 69 6c 20 |ill bloc|k until |
|00001ec0| 74 68 65 20 63 6f 6e 6e | 65 63 74 69 6f 6e 20 69 |the conn|ection i|
|00001ed0| 73 20 61 63 68 69 65 76 | 65 64 20 6f 72 20 74 68 |s achiev|ed or th|
|00001ee0| 65 20 61 74 74 65 6d 70 | 74 20 66 61 69 6c 73 2e |e attemp|t fails.|
|00001ef0| 20 49 66 20 74 68 65 20 | 73 6f 63 6b 65 74 20 68 | If the |socket h|
|00001f00| 61 73 20 62 65 65 6e 20 | 6d 61 72 6b 65 64 20 6e |as been |marked n|
|00001f10| 6f 6e 2d 62 6c 6f 63 6b | 69 6e 67 20 69 74 20 77 |on-block|ing it w|
|00001f20| 69 6c 6c 20 69 6e 73 74 | 65 61 64 20 72 65 74 75 |ill inst|ead retu|
|00001f30| 72 6e 20 69 6d 6d 65 64 | 69 61 74 65 6c 79 20 77 |rn immed|iately w|
|00001f40| 69 74 68 20 74 68 65 20 | 65 72 72 6f 72 20 3c 45 |ith the |error <E|
|00001f50| 49 4e 50 52 4f 47 52 45 | 53 53 3d 3e 65 72 72 6f |INPROGRE|SS=>erro|
|00001f60| 72 73 3e 20 61 6e 64 20 | 77 69 6c 6c 20 63 6f 6e |rs> and |will con|
|00001f70| 74 69 6e 75 65 20 77 69 | 74 68 20 74 68 65 20 63 |tinue wi|th the c|
|00001f80| 6f 6e 6e 65 63 74 69 6f | 6e 20 61 74 74 65 6d 70 |onnectio|n attemp|
|00001f90| 74 20 6f 6e 20 69 74 73 | 20 6f 77 6e 2e 00 00 00 |t on its| own....|
|00001fa0| 44 41 54 41 2b 05 00 00 | 53 6f 63 6b 65 74 5f 43 |DATA+...|Socket_C|
|00001fb0| 72 65 61 74 20 20 28 26 | 34 31 32 30 30 29 20 20 |reat (&|41200) |
|00001fc0| 73 6f 63 6b 65 74 28 29 | 0a 45 6e 74 72 79 0a 20 |socket()|.Entry. |
|00001fd0| 09 52 30 20 3d 20 50 72 | 6f 74 6f 63 6f 6c 20 66 |.R0 = Pr|otocol f|
|00001fe0| 61 6d 69 6c 79 0a 20 09 | 52 31 20 3d 20 53 6f 63 |amily. .|R1 = Soc|
|00001ff0| 6b 65 74 20 74 79 70 65 | 0a 20 09 52 32 20 3d 20 |ket type|. .R2 = |
|00002000| 50 72 6f 74 6f 63 6f 6c | 0a 45 78 69 74 0a 20 09 |Protocol|.Exit. .|
|00002010| 52 30 20 3d 20 53 6f 63 | 6b 65 74 20 64 65 73 63 |R0 = Soc|ket desc|
|00002020| 72 69 70 74 6f 72 0a 0a | 54 68 69 73 20 63 61 6c |riptor..|This cal|
|00002030| 6c 20 63 72 65 61 74 65 | 73 20 61 20 6e 65 77 20 |l create|s a new |
|00002040| 73 6f 63 6b 65 74 20 6f | 66 20 61 20 67 69 76 65 |socket o|f a give|
|00002050| 6e 20 74 79 70 65 20 61 | 6e 64 20 75 73 69 6e 67 |n type a|nd using|
|00002060| 20 61 20 67 69 76 65 6e | 20 70 72 6f 74 6f 63 6f | a given| protoco|
|00002070| 6c 2e 20 20 49 66 20 74 | 68 65 20 70 72 6f 74 6f |l. If t|he proto|
|00002080| 63 6f 6c 20 69 73 20 6c | 65 66 74 20 75 6e 73 70 |col is l|eft unsp|
|00002090| 65 63 69 66 69 65 64 20 | 28 70 61 73 73 65 64 20 |ecified |(passed |
|000020a0| 61 73 20 7a 65 72 6f 29 | 2c 20 61 20 64 65 66 61 |as zero)|, a defa|
|000020b0| 75 6c 74 20 61 70 70 6c | 69 63 61 62 6c 65 20 74 |ult appl|icable t|
|000020c0| 6f 20 74 68 61 74 20 73 | 6f 63 6b 65 74 20 74 79 |o that s|ocket ty|
|000020d0| 70 65 20 77 69 6c 6c 20 | 62 65 20 75 73 65 64 2e |pe will |be used.|
|000020e0| 0a 0a 54 68 65 20 69 6e | 74 65 72 6e 65 74 20 70 |..The in|ternet p|
|000020f0| 72 6f 74 6f 63 6f 6c 20 | 66 61 6d 69 6c 79 20 28 |rotocol |family (|
|00002100| 3c 50 46 5f 49 4e 45 54 | 3d 3e 63 6f 6e 73 74 61 |<PF_INET|=>consta|
|00002110| 6e 74 73 3e 29 20 69 73 | 20 74 68 65 20 6f 6e 6c |nts>) is| the onl|
|00002120| 79 20 6f 6e 65 20 73 75 | 70 70 6f 72 74 65 64 20 |y one su|pported |
|00002130| 62 79 20 74 68 69 73 20 | 6d 6f 64 75 6c 65 2e 20 |by this |module. |
|00002140| 54 68 72 65 65 20 73 6f | 63 6b 65 74 20 74 79 70 |Three so|cket typ|
|00002150| 65 20 61 72 65 20 73 75 | 70 70 6f 72 74 65 64 3a |e are su|pported:|
|00002160| 0a 0a 09 3c 53 4f 43 4b | 5f 53 54 52 45 41 4d 3d |...<SOCK|_STREAM=|
|00002170| 3e 63 6f 6e 73 74 61 6e | 74 73 3e 09 20 09 53 74 |>constan|ts>. .St|
|00002180| 72 65 61 6d 20 6f 72 69 | 65 6e 74 61 74 65 64 20 |ream ori|entated |
|00002190| 63 6f 6e 6e 65 63 74 69 | 6f 6e 73 20 70 72 6f 76 |connecti|ons prov|
|000021a0| 69 64 69 6e 67 20 62 69 | 2d 64 69 72 65 63 74 69 |iding bi|-directi|
|000021b0| 6f 6e 61 6c 20 73 65 71 | 75 65 6e 63 65 64 2c 20 |onal seq|uenced, |
|000021c0| 72 65 6c 69 61 62 6c 65 | 20 74 72 61 6e 73 66 65 |reliable| transfe|
|000021d0| 72 20 6f 66 20 62 79 74 | 65 20 73 74 72 65 61 6d |r of byt|e stream|
|000021e0| 73 2e 20 54 68 65 20 6f | 6e 6c 79 20 70 72 6f 74 |s. The o|nly prot|
|000021f0| 6f 63 6f 6c 20 6f 66 20 | 74 68 69 73 20 74 79 70 |ocol of |this typ|
|00002200| 65 20 63 75 72 72 65 6e | 74 6c 79 20 73 75 70 70 |e curren|tly supp|
|00002210| 6f 72 74 65 64 20 69 73 | 20 74 68 65 20 74 72 61 |orted is| the tra|
|00002220| 6e 73 6d 69 73 73 69 6f | 6e 20 63 6f 6e 74 72 6f |nsmissio|n contro|
|00002230| 6c 20 70 72 6f 74 6f 63 | 6f 6c 20 28 54 43 50 29 |l protoc|ol (TCP)|
|00002240| 2e 0a 0a 09 3c 53 4f 43 | 4b 5f 44 47 52 41 4d 3d |....<SOC|K_DGRAM=|
|00002250| 3e 63 6f 6e 73 74 61 6e | 74 73 3e 09 20 09 43 6f |>constan|ts>. .Co|
|00002260| 6e 6e 65 63 74 69 6f 6e | 6c 65 73 73 2c 20 6d 65 |nnection|less, me|
|00002270| 73 73 61 67 65 73 20 62 | 61 73 65 64 20 70 72 6f |ssages b|ased pro|
|00002280| 74 6f 63 6f 6c 73 20 70 | 72 6f 76 69 64 69 6e 67 |tocols p|roviding|
|00002290| 20 75 6e 72 65 6c 69 61 | 62 6c 65 2c 20 6e 6f 6e | unrelia|ble, non|
|000022a0| 2d 73 65 71 75 65 6e 63 | 65 20 63 6f 6d 6d 75 6e |-sequenc|e commun|
|000022b0| 69 63 61 74 69 6f 6e 2e | 20 54 68 65 20 6f 6e 6c |ication.| The onl|
|000022c0| 79 20 70 72 6f 74 6f 63 | 6f 6c 20 6f 66 20 74 68 |y protoc|ol of th|
|000022d0| 69 73 20 74 79 70 65 20 | 63 75 72 72 65 6e 74 6c |is type |currentl|
|000022e0| 79 20 73 75 70 70 6f 72 | 74 65 64 20 69 73 20 74 |y suppor|ted is t|
|000022f0| 68 65 20 75 73 65 72 20 | 64 61 74 61 67 72 61 6d |he user |datagram|
|00002300| 20 70 72 6f 74 6f 63 6f | 6c 20 28 55 44 50 29 2e | protoco|l (UDP).|
|00002310| 0a 0a 09 3c 53 4f 43 4b | 5f 52 41 57 3d 3e 63 6f |...<SOCK|_RAW=>co|
|00002320| 6e 73 74 61 6e 74 73 3e | 09 20 09 4c 6f 77 20 6c |nstants>|. .Low l|
|00002330| 65 76 65 6c 20 61 63 63 | 65 73 73 20 74 6f 20 74 |evel acc|ess to t|
|00002340| 68 65 20 75 6e 64 65 72 | 6c 79 69 6e 67 20 70 61 |he under|lying pa|
|00002350| 63 6b 65 74 20 62 61 73 | 65 64 20 74 72 61 6e 73 |cket bas|ed trans|
|00002360| 70 6f 72 74 20 6d 65 63 | 68 61 6e 69 73 6d 20 74 |port mec|hanism t|
|00002370| 6f 20 61 6c 6c 6f 77 20 | 74 68 65 20 69 6d 70 6c |o allow |the impl|
|00002380| 65 6d 65 6e 74 61 74 69 | 6f 6e 20 6f 66 20 61 6c |ementati|on of al|
|00002390| 74 65 72 6e 61 74 69 76 | 65 20 68 69 67 68 65 72 |ternativ|e higher|
|000023a0| 20 6c 65 76 65 6c 20 70 | 72 6f 74 6f 63 6f 6c 73 | level p|rotocols|
|000023b0| 2e 0a 0a 4e 6f 74 65 20 | 74 68 61 74 20 74 68 69 |...Note |that thi|
|000023c0| 73 20 63 61 6c 6c 20 77 | 69 6c 6c 20 6e 6f 74 20 |s call w|ill not |
|000023d0| 67 69 76 65 20 74 68 65 | 20 73 6f 63 6b 65 74 20 |give the| socket |
|000023e0| 61 6e 20 61 64 64 72 65 | 73 73 2c 20 6f 72 20 63 |an addre|ss, or c|
|000023f0| 6f 6e 6e 65 63 74 20 69 | 74 20 74 6f 20 61 6e 79 |onnect i|t to any|
|00002400| 20 72 65 6d 6f 74 65 20 | 61 64 64 72 65 73 73 2e | remote |address.|
|00002410| 20 54 68 65 20 73 6f 63 | 6b 65 74 20 63 61 6e 20 | The soc|ket can |
|00002420| 62 65 20 67 69 76 65 6e | 20 61 6e 20 61 64 64 72 |be given| an addr|
|00002430| 65 73 73 20 65 78 70 6c | 69 63 69 74 6c 79 20 75 |ess expl|icitly u|
|00002440| 73 69 6e 67 20 74 68 65 | 20 3c 53 6f 63 6b 65 74 |sing the| <Socket|
|00002450| 5f 42 69 6e 64 3e 20 63 | 61 6c 6c 2c 20 6f 72 20 |_Bind> c|all, or |
|00002460| 69 74 20 77 69 6c 6c 20 | 62 65 20 61 73 73 69 67 |it will |be assig|
|00002470| 6e 65 64 20 6f 6e 65 20 | 61 75 74 6f 6d 61 74 69 |ned one |automati|
|00002480| 63 61 6c 6c 79 20 77 68 | 65 6e 20 69 74 20 69 73 |cally wh|en it is|
|00002490| 20 66 69 72 73 74 20 75 | 73 65 64 20 74 6f 20 73 | first u|sed to s|
|000024a0| 65 6e 64 20 64 61 74 61 | 20 6f 72 20 74 6f 20 63 |end data| or to c|
|000024b0| 6f 6e 6e 65 63 74 20 74 | 6f 20 61 20 72 65 6d 6f |onnect t|o a remo|
|000024c0| 74 65 20 61 64 64 72 65 | 73 73 2e 00 44 41 54 41 |te addre|ss..DATA|
|000024d0| 33 01 00 00 53 6f 63 6b | 65 74 5f 47 65 74 70 65 |3...Sock|et_Getpe|
|000024e0| 65 72 6e 61 6d 65 20 20 | 28 26 34 31 32 30 45 29 |ername |(&4120E)|
|000024f0| 20 20 67 65 74 70 65 65 | 72 6e 61 6d 65 28 29 0a | getpee|rname().|
|00002500| 45 6e 74 72 79 0a 20 09 | 52 30 20 3d 20 53 6f 63 |Entry. .|R0 = Soc|
|00002510| 6b 65 74 20 64 65 73 63 | 72 69 70 74 6f 72 0a 20 |ket desc|riptor. |
|00002520| 09 52 31 20 3d 20 50 6f | 69 6e 74 65 72 20 74 6f |.R1 = Po|inter to|
|00002530| 20 61 64 64 72 65 73 73 | 20 74 6f 20 62 65 20 66 | address| to be f|
|00002540| 69 6c 6c 65 64 20 69 6e | 0a 20 09 52 32 20 3d 20 |illed in|. .R2 = |
|00002550| 50 6f 69 6e 74 65 72 20 | 74 6f 20 77 6f 72 64 20 |Pointer |to word |
|00002560| 67 69 76 69 6e 67 20 74 | 68 65 20 73 69 7a 65 20 |giving t|he size |
|00002570| 6f 66 20 74 68 65 20 61 | 64 64 72 65 73 73 20 62 |of the a|ddress b|
|00002580| 6c 6f 63 6b 0a 45 78 69 | 74 0a 20 09 52 30 20 63 |lock.Exi|t. .R0 c|
|00002590| 6f 72 72 75 70 74 65 64 | 0a 0a 54 68 69 73 20 63 |orrupted|..This c|
|000025a0| 61 6c 6c 20 72 65 74 75 | 72 6e 73 20 74 68 65 20 |all retu|rns the |
|000025b0| 61 64 64 72 65 73 73 20 | 74 68 61 74 20 74 68 65 |address |that the|
|000025c0| 20 73 6f 63 6b 65 74 20 | 69 73 20 63 6f 6e 6e 65 | socket |is conne|
|000025d0| 63 74 65 64 20 74 6f 20 | 28 69 66 20 61 6e 79 29 |cted to |(if any)|
|000025e0| 20 69 6e 20 74 68 65 20 | 73 75 70 70 6c 69 65 64 | in the |supplied|
|000025f0| 20 61 64 64 72 65 73 73 | 20 62 6c 6f 63 6b 2e 00 | address| block..|
|00002600| 44 41 54 41 35 01 00 00 | 53 6f 63 6b 65 74 5f 47 |DATA5...|Socket_G|
|00002610| 65 74 73 6f 63 6b 6e 61 | 6d 65 20 20 28 26 34 31 |etsockna|me (&41|
|00002620| 32 30 46 29 20 20 67 65 | 74 73 6f 63 6b 6e 61 6d |20F) ge|tsocknam|
|00002630| 65 28 29 0a 45 6e 74 72 | 79 0a 20 09 52 30 20 3d |e().Entr|y. .R0 =|
|00002640| 20 53 6f 63 6b 65 74 20 | 64 65 73 63 72 69 70 74 | Socket |descript|
|00002650| 6f 72 0a 20 09 52 31 20 | 3d 20 50 6f 69 6e 74 65 |or. .R1 |= Pointe|
|00002660| 72 20 74 6f 20 61 64 64 | 72 65 73 73 20 74 6f 20 |r to add|ress to |
|00002670| 62 65 20 66 69 6c 6c 65 | 64 20 69 6e 0a 20 09 52 |be fille|d in. .R|
|00002680| 32 20 3d 20 50 6f 69 6e | 74 65 72 20 74 6f 20 77 |2 = Poin|ter to w|
|00002690| 6f 72 64 20 67 69 76 69 | 6e 67 20 74 68 65 20 73 |ord givi|ng the s|
|000026a0| 69 7a 65 20 6f 66 20 74 | 68 65 20 61 64 64 72 65 |ize of t|he addre|
|000026b0| 73 73 20 62 6c 6f 63 6b | 0a 45 78 69 74 0a 20 09 |ss block|.Exit. .|
|000026c0| 52 30 20 63 6f 72 72 75 | 70 74 65 64 0a 0a 54 68 |R0 corru|pted..Th|
|000026d0| 69 73 20 63 61 6c 6c 20 | 72 65 74 75 72 6e 73 20 |is call |returns |
|000026e0| 74 68 65 20 6c 6f 63 61 | 6c 20 61 64 64 72 65 73 |the loca|l addres|
|000026f0| 73 20 74 68 61 74 20 74 | 68 65 20 73 6f 63 6b 65 |s that t|he socke|
|00002700| 74 20 69 73 20 62 6f 75 | 6e 64 20 74 6f 20 28 69 |t is bou|nd to (i|
|00002710| 66 20 61 6e 79 29 20 69 | 6e 20 74 68 65 20 73 75 |f any) i|n the su|
|00002720| 70 70 6c 69 65 64 20 61 | 64 64 72 65 73 73 20 62 |pplied a|ddress b|
|00002730| 6c 6f 63 6b 2e 00 00 00 | 44 41 54 41 65 02 00 00 |lock....|DATAe...|
|00002740| 53 6f 63 6b 65 74 5f 47 | 65 74 73 6f 63 6b 6f 70 |Socket_G|etsockop|
|00002750| 74 20 20 28 26 34 31 32 | 30 44 29 20 20 67 65 74 |t (&412|0D) get|
|00002760| 73 6f 63 6b 6f 70 74 28 | 29 0a 45 6e 74 72 79 0a |sockopt(|).Entry.|
|00002770| 20 09 52 30 20 3d 20 53 | 6f 63 6b 65 74 20 64 65 | .R0 = S|ocket de|
|00002780| 73 63 72 69 70 74 6f 72 | 0a 20 09 52 31 20 3d 20 |scriptor|. .R1 = |
|00002790| 4f 70 74 69 6f 6e 20 6c | 65 76 65 6c 0a 20 09 52 |Option l|evel. .R|
|000027a0| 32 20 3d 20 4f 70 74 69 | 6f 6e 0a 20 09 52 33 20 |2 = Opti|on. .R3 |
|000027b0| 3d 20 50 6f 69 6e 74 65 | 72 20 74 6f 20 62 75 66 |= Pointe|r to buf|
|000027c0| 66 65 72 20 66 6f 72 20 | 6f 70 74 69 6f 6e 20 76 |fer for |option v|
|000027d0| 61 6c 75 65 0a 20 09 52 | 34 20 3d 20 53 69 7a 65 |alue. .R|4 = Size|
|000027e0| 20 6f 66 20 6f 70 74 69 | 6f 6e 20 76 61 6c 75 65 | of opti|on value|
|000027f0| 20 62 75 66 66 65 72 0a | 45 78 69 74 0a 20 09 52 | buffer.|Exit. .R|
|00002800| 30 20 63 6f 72 72 75 70 | 74 65 64 0a 0a 54 68 69 |0 corrup|ted..Thi|
|00002810| 73 20 63 61 6c 6c 20 63 | 61 6e 20 62 65 20 75 73 |s call c|an be us|
|00002820| 65 64 20 74 6f 20 72 65 | 61 64 20 74 68 65 20 63 |ed to re|ad the c|
|00002830| 75 72 72 65 6e 74 20 76 | 61 6c 75 65 20 6f 66 20 |urrent v|alue of |
|00002840| 61 6e 79 20 6f 66 20 74 | 68 65 20 6f 70 74 69 6f |any of t|he optio|
|00002850| 6e 73 20 73 65 74 20 75 | 73 69 6e 67 20 3c 53 6f |ns set u|sing <So|
|00002860| 63 6b 65 74 5f 53 65 74 | 73 6f 63 6b 6f 70 74 3e |cket_Set|sockopt>|
|00002870| 2e 20 49 6e 20 61 64 64 | 69 74 69 6f 6e 2c 20 74 |. In add|ition, t|
|00002880| 68 65 72 65 20 61 72 65 | 20 74 77 6f 20 6d 6f 72 |here are| two mor|
|00002890| 65 20 73 6f 63 6b 65 74 | 20 6c 65 76 65 6c 20 6f |e socket| level o|
|000028a0| 70 74 69 6f 6e 73 20 74 | 68 61 74 20 63 61 6e 20 |ptions t|hat can |
|000028b0| 62 65 20 72 65 61 64 20 | 62 75 74 20 6e 6f 74 20 |be read |but not |
|000028c0| 77 72 69 74 74 65 6e 3a | 0a 0a 20 09 3c 53 4f 5f |written:|.. .<SO_|
|000028d0| 45 52 52 4f 52 3d 3e 63 | 6f 6e 73 74 61 6e 74 73 |ERROR=>c|onstants|
|000028e0| 3e 09 52 65 74 75 72 6e | 20 74 68 65 20 55 6e 69 |>.Return| the Uni|
|000028f0| 78 20 65 72 72 6f 72 20 | 63 6f 64 65 20 66 6f 72 |x error |code for|
|00002900| 20 61 6e 79 20 65 72 72 | 6f 72 20 77 68 69 63 68 | any err|or which|
|00002910| 20 68 61 73 20 6f 63 63 | 75 72 72 65 64 20 6f 6e | has occ|urred on|
|00002920| 20 74 68 65 20 73 6f 63 | 6b 65 74 2c 20 61 6e 64 | the soc|ket, and|
|00002930| 20 63 6c 65 61 72 20 74 | 68 65 20 73 6f 63 6b 65 | clear t|he socke|
|00002940| 74 73 20 65 72 72 6f 72 | 20 66 6c 61 67 2e 0a 0a |ts error| flag...|
|00002950| 09 3c 53 4f 5f 54 59 50 | 45 3d 3e 63 6f 6e 73 74 |.<SO_TYP|E=>const|
|00002960| 61 6e 74 73 3e 09 52 65 | 74 75 72 6e 20 74 68 65 |ants>.Re|turn the|
|00002970| 20 73 6f 63 6b 65 74 20 | 74 79 70 65 20 73 65 74 | socket |type set|
|00002980| 20 77 68 65 6e 20 74 68 | 65 20 73 6f 63 6b 65 74 | when th|e socket|
|00002990| 20 77 61 73 20 63 72 65 | 61 74 65 64 2e 00 00 00 | was cre|ated....|
|000029a0| 44 41 54 41 d1 00 00 00 | 53 6f 63 6b 65 74 5f 47 |DATA....|Socket_G|
|000029b0| 65 74 74 73 69 7a 65 20 | 20 28 26 34 31 32 31 38 |ettsize | (&41218|
|000029c0| 29 20 20 46 44 5f 53 45 | 54 53 49 5a 45 0a 45 6e |) FD_SE|TSIZE.En|
|000029d0| 74 72 79 0a 20 09 4e 6f | 74 68 69 6e 67 0a 45 78 |try. .No|thing.Ex|
|000029e0| 69 74 0a 20 09 52 30 20 | 3d 20 4e 75 6d 62 65 72 |it. .R0 |= Number|
|000029f0| 20 6f 66 20 64 65 73 63 | 72 69 70 74 6f 72 73 20 | of desc|riptors |
|00002a00| 61 76 61 69 6c 61 62 6c | 65 0a 0a 54 68 69 73 20 |availabl|e..This |
|00002a10| 63 61 6c 6c 20 72 65 74 | 75 72 6e 73 20 74 68 65 |call ret|urns the|
|00002a20| 20 6e 75 6d 62 65 72 20 | 6f 66 20 64 65 73 63 72 | number |of descr|
|00002a30| 69 70 74 6f 72 73 20 61 | 76 61 69 6c 61 62 6c 65 |iptors a|vailable|
|00002a40| 20 74 6f 20 74 68 65 20 | 63 61 6c 6c 65 72 2c 20 | to the |caller, |
|00002a50| 69 6e 63 6c 75 64 69 6e | 67 20 74 68 6f 73 65 20 |includin|g those |
|00002a60| 63 75 72 72 65 6e 74 6c | 79 20 69 6e 20 75 73 65 |currentl|y in use|
|00002a70| 2e 00 00 00 44 41 54 41 | 92 05 00 00 53 6f 63 6b |....DATA|....Sock|
|00002a80| 65 74 5f 49 6f 63 74 6c | 20 20 28 26 34 31 32 31 |et_Ioctl| (&4121|
|00002a90| 32 29 20 20 69 6f 63 74 | 6c 28 29 0a 45 6e 74 72 |2) ioct|l().Entr|
|00002aa0| 79 0a 20 09 52 30 20 3d | 20 53 6f 63 6b 65 74 20 |y. .R0 =| Socket |
|00002ab0| 64 65 73 63 72 69 70 74 | 6f 72 0a 20 09 52 31 20 |descript|or. .R1 |
|00002ac0| 3d 20 4f 70 65 72 61 74 | 69 6f 6e 0a 20 09 52 32 |= Operat|ion. .R2|
|00002ad0| 20 3d 20 50 6f 69 6e 74 | 65 72 20 74 6f 20 61 72 | = Point|er to ar|
|00002ae0| 67 75 6d 65 6e 74 0a 45 | 78 69 74 0a 20 09 52 30 |gument.E|xit. .R0|
|00002af0| 20 63 6f 72 72 75 70 74 | 65 64 0a 0a 54 68 69 73 | corrupt|ed..This|
|00002b00| 20 63 61 6c 6c 20 69 73 | 20 75 73 65 64 20 74 6f | call is| used to|
|00002b10| 20 70 65 72 66 6f 72 6d | 20 6d 69 73 63 65 6c 6c | perform| miscell|
|00002b20| 61 6e 65 6f 75 73 20 63 | 6f 6e 74 72 6f 6c 20 6f |aneous c|ontrol o|
|00002b30| 70 65 72 61 74 69 6f 6e | 73 20 6f 6e 20 69 6e 64 |peration|s on ind|
|00002b40| 69 76 69 64 75 61 6c 20 | 73 6f 63 6b 65 74 73 20 |ividual |sockets |
|00002b50| 61 6e 64 20 6f 6e 20 74 | 68 65 20 54 43 50 2f 49 |and on t|he TCP/I|
|00002b60| 50 20 73 74 61 63 6b 20 | 61 73 20 61 20 77 68 6f |P stack |as a who|
|00002b70| 6c 65 2e 20 41 74 20 74 | 68 65 20 6d 6f 6d 65 6e |le. At t|he momen|
|00002b80| 74 2c 20 74 68 65 73 65 | 20 6f 70 65 72 61 74 69 |t, these| operati|
|00002b90| 6f 6e 73 20 61 72 65 20 | 73 75 70 70 6f 72 74 65 |ons are |supporte|
|00002ba0| 64 3a 0a 0a 20 09 3c 46 | 49 4f 41 53 59 4e 43 3d |d:.. .<F|IOASYNC=|
|00002bb0| 3e 63 6f 6e 73 74 61 6e | 74 73 3e 09 4d 61 72 6b |>constan|ts>.Mark|
|00002bc0| 20 61 20 73 6f 63 6b 65 | 74 20 66 6f 72 20 61 73 | a socke|t for as|
|00002bd0| 79 6e 63 68 72 6f 6e 6f | 75 73 20 6f 70 65 72 61 |ynchrono|us opera|
|00002be0| 74 69 6f 6e 2e 20 54 68 | 69 73 20 6d 65 61 6e 73 |tion. Th|is means|
|00002bf0| 20 74 68 61 74 20 61 20 | 52 49 53 43 20 4f 53 20 | that a |RISC OS |
|00002c00| 65 76 65 6e 74 20 77 69 | 6c 6c 20 62 65 20 72 61 |event wi|ll be ra|
|00002c10| 69 73 65 64 20 77 68 65 | 6e 20 69 6d 70 6f 72 74 |ised whe|n import|
|00002c20| 61 6e 74 20 63 68 61 6e | 67 65 73 20 6f 63 63 75 |ant chan|ges occu|
|00002c30| 72 20 69 6e 20 74 68 65 | 20 73 6f 63 6b 65 74 73 |r in the| sockets|
|00002c40| 20 73 74 61 74 75 73 2e | 20 53 65 65 20 74 68 65 | status.| See the|
|00002c50| 20 73 65 63 74 69 6f 6e | 20 6f 6e 20 65 76 65 6e | section| on even|
|00002c60| 74 73 20 66 6f 72 20 6d | 6f 72 65 20 64 65 74 61 |ts for m|ore deta|
|00002c70| 69 6c 20 6f 66 20 74 68 | 65 20 65 76 65 6e 74 73 |il of th|e events|
|00002c80| 20 74 68 61 74 20 61 72 | 65 20 72 61 69 73 65 64 | that ar|e raised|
|00002c90| 2e 20 54 68 65 20 61 72 | 67 75 6d 65 6e 74 20 69 |. The ar|gument i|
|00002ca0| 73 20 61 20 73 69 6e 67 | 6c 65 20 77 6f 72 64 20 |s a sing|le word |
|00002cb0| 61 63 74 69 6e 67 20 61 | 73 20 61 20 62 6f 6f 6c |acting a|s a bool|
|00002cc0| 65 61 6e 20 66 6c 61 67 | 2e 0a 0a 20 09 3c 46 49 |ean flag|... .<FI|
|00002cd0| 4f 4e 42 49 4f 3d 3e 63 | 6f 6e 73 74 61 6e 74 73 |ONBIO=>c|onstants|
|00002ce0| 3e 09 4d 61 72 6b 20 61 | 20 73 6f 63 6b 65 74 20 |>.Mark a| socket |
|00002cf0| 6e 6f 6e 2d 62 6c 6f 63 | 6b 69 6e 67 20 73 6f 20 |non-bloc|king so |
|00002d00| 74 68 61 74 20 6e 6f 20 | 61 74 74 65 6d 70 74 65 |that no |attempte|
|00002d10| 64 20 6f 70 65 72 61 74 | 69 6f 6e 73 20 6f 6e 20 |d operat|ions on |
|00002d20| 74 68 65 20 73 6f 63 6b | 65 74 20 77 69 6c 6c 20 |the sock|et will |
|00002d30| 62 6c 6f 63 6b 2e 20 54 | 68 65 79 20 77 69 6c 6c |block. T|hey will|
|00002d40| 20 69 6e 73 74 65 61 64 | 20 66 61 69 6c 20 77 69 | instead| fail wi|
|00002d50| 74 68 20 74 68 65 20 65 | 72 72 6f 72 20 3c 45 57 |th the e|rror <EW|
|00002d60| 4f 55 4c 44 42 4c 4f 43 | 4b 3d 3e 65 72 72 6f 72 |OULDBLOC|K=>error|
|00002d70| 73 3e 20 69 66 20 74 68 | 65 79 20 61 72 65 20 75 |s> if th|ey are u|
|00002d80| 6e 61 62 6c 65 20 74 6f | 20 63 6f 6d 70 6c 65 74 |nable to| complet|
|00002d90| 65 20 73 74 72 61 69 67 | 68 74 20 61 77 61 79 2e |e straig|ht away.|
|00002da0| 20 54 68 65 20 61 72 67 | 75 6d 65 6e 74 20 69 73 | The arg|ument is|
|00002db0| 20 61 20 73 69 6e 67 6c | 65 20 77 6f 72 64 20 61 | a singl|e word a|
|00002dc0| 63 74 69 6e 67 20 61 73 | 20 61 20 62 6f 6f 6c 65 |cting as| a boole|
|00002dd0| 61 6e 20 66 6c 61 67 2e | 0a 0a 20 09 3c 46 49 4f |an flag.|.. .<FIO|
|00002de0| 4e 52 45 41 44 3d 3e 63 | 6f 6e 73 74 61 6e 74 73 |NREAD=>c|onstants|
|00002df0| 3e 09 52 65 61 64 20 74 | 68 65 20 6e 75 6d 62 65 |>.Read t|he numbe|
|00002e00| 72 20 6f 66 20 62 79 74 | 65 73 20 61 76 61 69 6c |r of byt|es avail|
|00002e10| 61 62 6c 65 20 66 6f 72 | 20 72 65 61 64 69 6e 67 |able for| reading|
|00002e20| 20 66 72 6f 6d 20 74 68 | 65 20 73 6f 63 6b 65 74 | from th|e socket|
|00002e30| 2e 20 54 68 65 20 61 72 | 67 75 6d 65 6e 74 20 69 |. The ar|gument i|
|00002e40| 73 20 61 6e 20 69 6e 74 | 65 67 65 72 20 77 68 69 |s an int|eger whi|
|00002e50| 63 68 20 77 69 6c 6c 20 | 62 65 20 66 69 6c 6c 65 |ch will |be fille|
|00002e60| 64 20 69 6e 20 77 69 74 | 68 20 74 68 65 20 6e 75 |d in wit|h the nu|
|00002e70| 6d 62 65 72 20 6f 66 20 | 62 79 74 65 73 20 61 76 |mber of |bytes av|
|00002e80| 61 69 6c 61 62 6c 65 2e | 0a 0a 20 09 3c 53 49 4f |ailable.|.. .<SIO|
|00002e90| 43 41 54 4d 41 52 4b 3d | 3e 63 6f 6e 73 74 61 6e |CATMARK=|>constan|
|00002ea0| 74 73 3e 09 52 65 61 64 | 20 61 20 62 6f 6f 6c 65 |ts>.Read| a boole|
|00002eb0| 61 6e 20 69 6e 64 69 63 | 61 74 6f 72 20 74 68 61 |an indic|ator tha|
|00002ec0| 74 20 73 61 79 73 20 77 | 68 65 74 68 65 72 20 77 |t says w|hether w|
|00002ed0| 65 20 61 72 65 20 61 74 | 20 74 68 65 20 4f 4f 42 |e are at| the OOB|
|00002ee0| 20 6d 61 72 6b 65 72 20 | 69 6e 20 74 68 65 20 64 | marker |in the d|
|00002ef0| 61 74 61 20 73 74 72 65 | 61 6d 2e 0a 0a 54 68 69 |ata stre|am...Thi|
|00002f00| 73 20 63 61 6c 6c 20 61 | 6c 73 6f 20 73 75 70 70 |s call a|lso supp|
|00002f10| 6f 72 74 73 20 63 65 72 | 74 61 69 6e 20 6f 70 65 |orts cer|tain ope|
|00002f20| 72 61 74 69 6f 6e 73 20 | 6f 6e 20 74 68 65 20 69 |rations |on the i|
|00002f30| 6e 74 65 72 66 61 63 65 | 20 74 61 62 6c 65 2c 20 |nterface| table, |
|00002f40| 62 75 74 20 64 65 74 61 | 69 6c 73 20 6f 66 20 74 |but deta|ils of t|
|00002f50| 68 69 73 20 61 72 65 20 | 6f 75 74 73 69 64 65 20 |his are |outside |
|00002f60| 74 68 65 20 63 75 72 72 | 65 6e 74 20 73 63 6f 70 |the curr|ent scop|
|00002f70| 65 20 6f 66 20 74 68 69 | 73 20 64 6f 63 75 6d 65 |e of thi|s docume|
|00002f80| 6e 74 2e 20 46 75 74 75 | 72 65 20 65 78 74 65 6e |nt. Futu|re exten|
|00002f90| 73 69 6f 6e 73 20 77 69 | 6c 6c 20 69 6d 70 6c 65 |sions wi|ll imple|
|00002fa0| 6d 65 6e 74 20 74 68 65 | 20 72 65 6d 61 69 6e 69 |ment the| remaini|
|00002fb0| 6e 67 20 6f 70 65 72 61 | 74 69 6f 6e 73 20 6f 6e |ng opera|tions on|
|00002fc0| 20 74 68 65 20 72 6f 75 | 74 69 6e 67 20 74 61 62 | the rou|ting tab|
|00002fd0| 6c 65 20 61 6e 64 20 61 | 6c 73 6f 20 61 20 73 65 |le and a|lso a se|
|00002fe0| 74 20 6f 66 20 6f 70 65 | 72 61 74 69 6f 6e 73 20 |t of ope|rations |
|00002ff0| 6f 6e 20 74 68 65 20 72 | 6f 75 74 69 6e 67 20 74 |on the r|outing t|
|00003000| 61 62 6c 65 73 2e 00 00 | 44 41 54 41 75 01 00 00 |ables...|DATAu...|
|00003010| 53 6f 63 6b 65 74 5f 4c | 69 73 74 65 6e 20 20 28 |Socket_L|isten (|
|00003020| 26 34 31 32 30 32 29 20 | 20 6c 69 73 74 65 6e 28 |&41202) | listen(|
|00003030| 29 0a 45 6e 74 72 79 0a | 20 09 52 30 20 3d 20 53 |).Entry.| .R0 = S|
|00003040| 6f 63 6b 65 74 20 64 65 | 73 63 72 69 70 74 6f 72 |ocket de|scriptor|
|00003050| 0a 20 09 52 31 20 3d 20 | 4d 61 78 69 6d 75 6d 20 |. .R1 = |Maximum |
|00003060| 62 61 63 6b 6c 6f 67 0a | 45 78 69 74 0a 20 09 52 |backlog.|Exit. .R|
|00003070| 30 20 63 6f 72 72 75 70 | 74 65 64 0a 0a 54 68 69 |0 corrup|ted..Thi|
|00003080| 73 20 63 61 6c 6c 20 63 | 61 75 73 65 73 20 61 20 |s call c|auses a |
|00003090| 73 6f 63 6b 65 74 20 6f | 66 20 74 79 70 65 20 3c |socket o|f type <|
|000030a0| 53 4f 43 4b 5f 53 54 52 | 45 41 4d 3d 3e 63 6f 6e |SOCK_STR|EAM=>con|
|000030b0| 73 74 61 6e 74 73 3e 20 | 74 6f 20 62 65 67 69 6e |stants> |to begin|
|000030c0| 20 6c 69 73 74 65 6e 69 | 6e 67 20 66 6f 72 20 69 | listeni|ng for i|
|000030d0| 6e 63 6f 6d 69 6e 67 20 | 63 6f 6e 6e 65 63 74 69 |ncoming |connecti|
|000030e0| 6f 6e 20 61 74 74 65 6d | 70 74 73 2e 20 54 68 65 |on attem|pts. The|
|000030f0| 20 62 61 63 6b 6c 6f 67 | 20 70 61 72 61 6d 65 74 | backlog| paramet|
|00003100| 65 72 20 73 70 65 63 69 | 66 69 65 73 20 74 68 65 |er speci|fies the|
|00003110| 20 6d 61 78 69 6d 75 6d | 20 6c 65 6e 67 74 68 20 | maximum| length |
|00003120| 74 68 61 74 20 74 68 65 | 20 71 75 65 75 65 20 6f |that the| queue o|
|00003130| 66 20 70 65 6e 64 69 6e | 67 20 63 6f 6e 6e 65 63 |f pendin|g connec|
|00003140| 74 69 6f 6e 73 20 6d 61 | 79 20 67 72 6f 77 20 74 |tions ma|y grow t|
|00003150| 6f 20 62 65 66 6f 72 65 | 20 63 6f 6e 6e 65 63 74 |o before| connect|
|00003160| 69 6f 6e 20 61 74 74 65 | 6d 70 74 73 20 77 69 6c |ion atte|mpts wil|
|00003170| 6c 20 62 65 20 72 65 66 | 75 73 65 64 2e 00 00 00 |l be ref|used....|
|00003180| 44 41 54 41 40 01 00 00 | 53 6f 63 6b 65 74 5f 52 |DATA@...|Socket_R|
|00003190| 65 61 64 20 20 28 26 34 | 31 32 31 33 29 20 20 72 |ead (&4|1213) r|
|000031a0| 65 61 64 28 29 0a 45 6e | 74 72 79 0a 20 09 52 30 |ead().En|try. .R0|
|000031b0| 20 3d 20 53 6f 63 6b 65 | 74 20 64 65 73 63 72 69 | = Socke|t descri|
|000031c0| 70 74 6f 72 0a 20 09 52 | 31 20 3d 20 50 6f 69 6e |ptor. .R|1 = Poin|
|000031d0| 74 65 72 20 74 6f 20 62 | 75 66 66 65 72 20 66 6f |ter to b|uffer fo|
|000031e0| 72 20 72 65 63 65 69 76 | 65 64 20 64 61 74 61 0a |r receiv|ed data.|
|000031f0| 20 09 52 32 20 3d 20 53 | 69 7a 65 20 6f 66 20 62 | .R2 = S|ize of b|
|00003200| 75 66 66 65 72 0a 45 78 | 69 74 0a 20 09 52 30 20 |uffer.Ex|it. .R0 |
|00003210| 3d 20 41 6d 6f 75 6e 74 | 20 6f 66 20 64 61 74 61 |= Amount| of data|
|00003220| 20 72 65 63 65 69 76 65 | 64 0a 0a 54 68 69 73 20 | receive|d..This |
|00003230| 63 61 6c 6c 20 72 65 61 | 64 73 20 64 61 74 61 20 |call rea|ds data |
|00003240| 66 72 6f 6d 20 61 20 73 | 6f 63 6b 65 74 20 69 6e |from a s|ocket in|
|00003250| 20 74 68 65 20 73 61 6d | 65 20 73 74 79 6c 65 20 | the sam|e style |
|00003260| 61 73 20 3c 53 6f 63 6b | 65 74 5f 52 65 63 76 3e |as <Sock|et_Recv>|
|00003270| 20 65 78 63 65 70 74 20 | 74 68 61 74 20 74 68 65 | except |that the|
|00003280| 72 65 20 69 73 20 6e 6f | 20 66 6c 61 67 73 20 61 |re is no| flags a|
|00003290| 72 67 75 6d 65 6e 74 2c | 20 73 6f 20 61 6c 6c 20 |rgument,| so all |
|000032a0| 66 6c 61 67 73 20 61 72 | 65 20 74 72 65 61 74 65 |flags ar|e treate|
|000032b0| 64 20 61 73 20 62 65 69 | 6e 67 20 7a 65 72 6f 2e |d as bei|ng zero.|
|000032c0| 44 41 54 41 77 01 00 00 | 53 6f 63 6b 65 74 5f 52 |DATAw...|Socket_R|
|000032d0| 65 61 64 76 20 20 28 26 | 34 31 32 31 36 29 20 20 |eadv (&|41216) |
|000032e0| 72 65 61 64 76 28 29 0a | 45 6e 74 72 79 0a 20 09 |readv().|Entry. .|
|000032f0| 52 30 20 3d 20 53 6f 63 | 6b 65 74 20 64 65 73 63 |R0 = Soc|ket desc|
|00003300| 72 69 70 74 6f 72 0a 20 | 09 52 31 20 3d 20 50 6f |riptor. |.R1 = Po|
|00003310| 69 6e 74 65 72 20 74 6f | 20 61 72 72 61 79 20 6f |inter to| array o|
|00003320| 66 20 62 75 66 66 65 72 | 20 64 65 73 63 72 69 70 |f buffer| descrip|
|00003330| 74 6f 72 73 0a 20 09 52 | 32 20 3d 20 4e 75 6d 62 |tors. .R|2 = Numb|
|00003340| 65 72 20 6f 66 20 62 75 | 66 66 65 72 20 64 65 73 |er of bu|ffer des|
|00003350| 63 72 69 70 74 6f 72 73 | 0a 45 78 69 74 0a 20 09 |criptors|.Exit. .|
|00003360| 52 30 20 3d 20 41 6d 6f | 75 6e 74 20 6f 66 20 64 |R0 = Amo|unt of d|
|00003370| 61 74 61 20 72 65 63 65 | 69 76 65 64 0a 0a 54 68 |ata rece|ived..Th|
|00003380| 69 73 20 63 61 6c 6c 20 | 72 65 61 64 73 20 64 61 |is call |reads da|
|00003390| 74 61 20 69 6e 74 6f 20 | 61 20 67 61 74 68 65 72 |ta into |a gather|
|000033a0| 20 61 72 72 61 79 2e 20 | 54 68 65 20 62 75 66 66 | array. |The buff|
|000033b0| 65 72 20 64 65 73 63 72 | 69 70 74 6f 72 73 20 61 |er descr|iptors a|
|000033c0| 72 65 20 74 68 65 20 73 | 61 6d 65 20 61 73 20 74 |re the s|ame as t|
|000033d0| 68 6f 73 65 20 64 65 73 | 63 72 69 62 65 64 20 66 |hose des|cribed f|
|000033e0| 6f 72 20 3c 53 6f 63 6b | 65 74 5f 52 65 63 76 6d |or <Sock|et_Recvm|
|000033f0| 73 67 3e 2c 20 61 6e 64 | 20 61 73 20 77 69 74 68 |sg>, and| as with|
|00003400| 20 3c 53 6f 63 6b 65 74 | 5f 52 65 61 64 3e 20 74 | <Socket|_Read> t|
|00003410| 68 65 20 66 6c 61 67 73 | 20 61 72 65 20 61 6c 6c |he flags| are all|
|00003420| 20 74 72 65 61 74 65 64 | 20 61 73 20 62 65 69 6e | treated| as bein|
|00003430| 67 20 7a 65 72 6f 2e 00 | 44 41 54 41 53 04 00 00 |g zero..|DATAS...|
|00003440| 53 6f 63 6b 65 74 5f 52 | 65 63 76 20 28 26 34 31 |Socket_R|ecv (&41|
|00003450| 32 30 35 29 20 20 72 65 | 63 76 28 29 0a 45 6e 74 |205) re|cv().Ent|
|00003460| 72 79 0a 20 09 52 30 20 | 3d 20 53 6f 63 6b 65 74 |ry. .R0 |= Socket|
|00003470| 20 64 65 73 63 72 69 70 | 74 6f 72 0a 20 09 52 31 | descrip|tor. .R1|
|00003480| 20 3d 20 50 6f 69 6e 74 | 65 72 20 74 6f 20 62 75 | = Point|er to bu|
|00003490| 66 66 65 72 20 66 6f 72 | 20 72 65 63 65 69 76 65 |ffer for| receive|
|000034a0| 64 20 64 61 74 61 0a 20 | 09 52 32 20 3d 20 53 69 |d data. |.R2 = Si|
|000034b0| 7a 65 20 6f 66 20 62 75 | 66 66 65 72 0a 20 09 52 |ze of bu|ffer. .R|
|000034c0| 33 20 3d 20 46 6c 61 67 | 73 0a 45 78 69 74 0a 20 |3 = Flag|s.Exit. |
|000034d0| 09 52 30 20 3d 20 41 6d | 6f 75 6e 74 20 6f 66 20 |.R0 = Am|ount of |
|000034e0| 64 61 74 61 20 72 65 63 | 65 69 76 65 64 0a 0a 54 |data rec|eived..T|
|000034f0| 68 69 73 20 63 61 6c 6c | 20 72 65 61 64 73 20 61 |his call| reads a|
|00003500| 73 20 6d 75 63 68 20 64 | 61 74 61 20 61 73 20 70 |s much d|ata as p|
|00003510| 6f 73 73 69 62 6c 65 20 | 66 72 6f 6d 20 74 68 65 |ossible |from the|
|00003520| 20 73 70 65 63 69 66 69 | 65 64 20 73 6f 63 6b 65 | specifi|ed socke|
|00003530| 74 2c 20 61 6e 64 20 72 | 65 74 75 72 6e 73 20 69 |t, and r|eturns i|
|00003540| 74 20 69 6e 20 74 68 65 | 20 73 75 70 70 6c 69 65 |t in the| supplie|
|00003550| 64 20 62 75 66 66 65 72 | 2e 20 49 66 20 6e 6f 20 |d buffer|. If no |
|00003560| 64 61 74 61 20 69 73 20 | 61 76 61 69 6c 61 62 6c |data is |availabl|
|00003570| 65 2c 20 74 68 65 20 63 | 61 6c 6c 20 77 69 6c 6c |e, the c|all will|
|00003580| 20 62 6c 6f 63 6b 20 75 | 6e 74 69 6c 20 64 61 74 | block u|ntil dat|
|00003590| 61 20 69 73 20 61 76 61 | 69 6c 61 62 6c 65 2c 20 |a is ava|ilable, |
|000035a0| 75 6e 6c 65 73 73 20 74 | 68 65 20 73 6f 63 6b 65 |unless t|he socke|
|000035b0| 74 20 68 61 73 20 62 65 | 65 6e 20 6d 61 72 6b 65 |t has be|en marke|
|000035c0| 64 20 6e 6f 6e 2d 62 6c | 6f 63 6b 69 6e 67 2c 20 |d non-bl|ocking, |
|000035d0| 69 6e 20 77 68 69 63 68 | 20 63 61 73 65 20 3c 45 |in which| case <E|
|000035e0| 57 4f 55 4c 44 42 4c 4f | 43 4b 3d 3e 65 72 72 6f |WOULDBLO|CK=>erro|
|000035f0| 72 73 3e 20 77 69 6c 6c | 20 62 65 20 72 65 74 75 |rs> will| be retu|
|00003600| 72 6e 65 64 2e 0a 0a 56 | 61 72 69 6f 75 73 20 62 |rned...V|arious b|
|00003610| 69 74 73 20 69 6e 20 74 | 68 65 20 66 6c 61 67 73 |its in t|he flags|
|00003620| 20 77 6f 72 64 20 63 61 | 6e 20 62 65 20 73 65 74 | word ca|n be set|
|00003630| 20 74 6f 20 61 66 66 65 | 63 74 20 68 6f 77 20 68 | to affe|ct how h|
|00003640| 6f 77 20 74 68 65 20 72 | 65 61 64 20 69 73 20 70 |ow the r|ead is p|
|00003650| 65 72 66 6f 72 6d 65 64 | 3a 0a 0a 20 09 3c 4d 53 |erformed|:.. .<MS|
|00003660| 47 5f 50 45 45 4b 3d 3e | 63 6f 6e 73 74 61 6e 74 |G_PEEK=>|constant|
|00003670| 73 3e 09 4a 75 73 74 20 | 70 65 65 6b 20 61 74 20 |s>.Just |peek at |
|00003680| 74 68 65 20 64 61 74 61 | 2c 20 6c 65 61 76 69 6e |the data|, leavin|
|00003690| 67 20 69 74 20 69 6e 20 | 70 6c 61 63 65 20 74 6f |g it in |place to|
|000036a0| 20 62 65 20 72 65 61 64 | 20 62 79 20 61 20 73 75 | be read| by a su|
|000036b0| 62 73 65 71 75 65 6e 74 | 20 63 61 6c 6c 2e 0a 0a |bsequent| call...|
|000036c0| 20 09 3c 4d 53 47 5f 4f | 4f 42 3d 3e 63 6f 6e 73 | .<MSG_O|OB=>cons|
|000036d0| 74 61 6e 74 73 3e 09 52 | 65 61 64 20 61 6e 79 20 |tants>.R|ead any |
|000036e0| 6f 75 74 2d 6f 66 2d 62 | 61 6e 64 20 64 61 74 61 |out-of-b|and data|
|000036f0| 20 74 68 61 74 20 69 73 | 20 77 61 69 74 69 6e 67 | that is| waiting|
|00003700| 20 6f 6e 20 74 68 65 20 | 73 6f 63 6b 65 74 2c 20 | on the |socket, |
|00003710| 69 6e 20 70 6c 61 63 65 | 20 6f 66 20 74 68 65 20 |in place| of the |
|00003720| 6e 6f 72 6d 61 6c 20 64 | 61 74 61 2e 0a 0a 20 09 |normal d|ata... .|
|00003730| 3c 4d 53 47 5f 44 4f 4e | 54 57 41 49 54 3d 3e 63 |<MSG_DON|TWAIT=>c|
|00003740| 6f 6e 73 74 61 6e 74 73 | 3e 09 54 72 65 61 74 20 |onstants|>.Treat |
|00003750| 74 68 69 73 20 70 61 72 | 74 69 63 75 6c 61 72 20 |this par|ticular |
|00003760| 63 61 6c 6c 20 61 73 20 | 6e 6f 6e 2d 62 6c 6f 63 |call as |non-bloc|
|00003770| 6b 69 6e 67 2c 20 69 67 | 6e 6f 72 69 6e 67 20 74 |king, ig|noring t|
|00003780| 68 65 20 73 6f 63 6b 65 | 74 73 20 6e 6f 72 6d 61 |he socke|ts norma|
|00003790| 6c 20 62 6c 6f 63 6b 69 | 6e 67 2f 6e 6f 6e 2d 62 |l blocki|ng/non-b|
|000037a0| 6c 6f 63 6b 69 6e 67 20 | 73 74 61 74 75 73 2e 0a |locking |status..|
|000037b0| 0a 20 09 3c 4d 53 47 5f | 57 41 49 54 41 4c 4c 3d |. .<MSG_|WAITALL=|
|000037c0| 3e 63 6f 6e 73 74 61 6e | 74 73 3e 09 54 72 79 20 |>constan|ts>.Try |
|000037d0| 61 6e 64 20 63 6f 6d 70 | 6c 65 74 65 6c 79 20 66 |and comp|letely f|
|000037e0| 69 6c 6c 20 74 68 65 20 | 73 75 70 70 6c 69 65 64 |ill the |supplied|
|000037f0| 20 62 75 66 66 65 72 2c | 20 62 6c 6f 63 6b 69 6e | buffer,| blockin|
|00003800| 67 20 66 6f 72 20 6d 6f | 72 65 20 64 61 74 61 20 |g for mo|re data |
|00003810| 69 66 20 6e 65 63 65 73 | 73 61 72 79 2e 0a 0a 46 |if neces|sary...F|
|00003820| 6f 72 20 73 74 72 65 61 | 6d 20 73 6f 63 6b 65 74 |or strea|m socket|
|00003830| 73 2c 20 74 68 69 73 20 | 63 61 6c 6c 20 6d 61 79 |s, this |call may|
|00003840| 20 72 65 74 75 72 6e 20 | 7a 65 72 6f 20 61 73 20 | return |zero as |
|00003850| 61 6e 20 69 6e 64 69 63 | 61 74 69 6f 6e 20 74 68 |an indic|ation th|
|00003860| 61 74 20 74 68 65 20 6f | 74 68 65 72 20 65 6e 64 |at the o|ther end|
|00003870| 20 68 61 73 20 63 6c 6f | 73 65 64 20 74 68 65 20 | has clo|sed the |
|00003880| 63 6f 6e 6e 65 63 74 69 | 6f 6e 2e 00 44 41 54 41 |connecti|on..DATA|
|00003890| d2 01 00 00 53 6f 63 6b | 65 74 5f 52 65 63 76 66 |....Sock|et_Recvf|
|000038a0| 72 6f 6d 20 20 28 26 34 | 31 32 30 36 29 20 20 72 |rom (&4|1206) r|
|000038b0| 65 63 76 66 72 6f 6d 28 | 29 0a 45 6e 74 72 79 0a |ecvfrom(|).Entry.|
|000038c0| 20 09 52 30 20 3d 20 53 | 6f 63 6b 65 74 20 64 65 | .R0 = S|ocket de|
|000038d0| 73 63 72 69 70 74 6f 72 | 0a 20 09 52 31 20 3d 20 |scriptor|. .R1 = |
|000038e0| 50 6f 69 6e 74 65 72 20 | 74 6f 20 62 75 66 66 65 |Pointer |to buffe|
|000038f0| 72 20 66 6f 72 20 72 65 | 63 65 69 76 65 64 20 64 |r for re|ceived d|
|00003900| 61 74 61 0a 20 09 52 32 | 20 3d 20 53 69 7a 65 20 |ata. .R2| = Size |
|00003910| 6f 66 20 62 75 66 66 65 | 72 0a 20 09 52 33 20 3d |of buffe|r. .R3 =|
|00003920| 20 46 6c 61 67 73 0a 20 | 09 52 34 20 3d 20 50 6f | Flags. |.R4 = Po|
|00003930| 69 6e 74 65 72 20 74 6f | 20 61 64 64 72 65 73 73 |inter to| address|
|00003940| 20 74 6f 20 62 65 20 66 | 69 6c 6c 65 64 20 69 6e | to be f|illed in|
|00003950| 0a 20 09 52 35 20 3d 20 | 53 69 7a 65 20 6f 66 20 |. .R5 = |Size of |
|00003960| 73 75 70 70 6c 69 65 64 | 20 61 64 64 72 65 73 73 |supplied| address|
|00003970| 20 62 6c 6f 63 6b 0a 45 | 78 69 74 0a 20 09 52 30 | block.E|xit. .R0|
|00003980| 20 3d 20 41 6d 6f 75 6e | 74 20 6f 66 20 64 61 74 | = Amoun|t of dat|
|00003990| 61 20 72 65 63 65 69 76 | 65 64 0a 0a 54 68 69 73 |a receiv|ed..This|
|000039a0| 20 63 61 6c 6c 20 68 61 | 73 20 69 64 65 6e 74 69 | call ha|s identi|
|000039b0| 63 61 6c 20 66 75 6e 63 | 74 69 6f 6e 61 6c 69 74 |cal func|tionalit|
|000039c0| 79 20 74 6f 20 3c 53 6f | 63 6b 65 74 5f 52 65 63 |y to <So|cket_Rec|
|000039d0| 76 3e 20 65 78 63 65 70 | 74 20 74 68 61 74 20 74 |v> excep|t that t|
|000039e0| 68 65 20 61 64 64 72 65 | 73 73 20 6f 66 20 74 68 |he addre|ss of th|
|000039f0| 65 20 68 6f 73 74 20 74 | 68 61 74 20 73 65 6e 74 |e host t|hat sent|
|00003a00| 20 74 68 65 20 64 61 74 | 61 20 77 69 6c 6c 20 62 | the dat|a will b|
|00003a10| 65 20 72 65 74 75 72 6e | 65 64 20 69 6e 20 74 68 |e return|ed in th|
|00003a20| 65 20 62 6c 6f 63 6b 20 | 73 75 70 70 6c 69 65 64 |e block |supplied|
|00003a30| 2c 20 69 6e 20 74 68 65 | 20 73 61 6d 65 20 66 6f |, in the| same fo|
|00003a40| 72 6d 61 74 20 61 73 20 | 75 73 65 64 20 62 79 20 |rmat as |used by |
|00003a50| 3c 53 6f 63 6b 65 74 5f | 42 69 6e 64 3e 2e 00 00 |<Socket_|Bind>...|
|00003a60| 44 41 54 41 f9 03 00 00 | 53 6f 63 6b 65 74 5f 52 |DATA....|Socket_R|
|00003a70| 65 63 76 6d 73 67 20 20 | 28 26 34 31 32 30 37 29 |ecvmsg |(&41207)|
|00003a80| 20 20 72 65 63 76 6d 73 | 67 28 29 0a 45 6e 74 72 | recvms|g().Entr|
|00003a90| 79 0a 20 09 52 30 20 3d | 20 53 6f 63 6b 65 74 20 |y. .R0 =| Socket |
|00003aa0| 64 65 73 63 72 69 70 74 | 6f 72 0a 20 09 52 31 20 |descript|or. .R1 |
|00003ab0| 3d 20 50 6f 69 6e 74 65 | 72 20 74 6f 20 6d 65 73 |= Pointe|r to mes|
|00003ac0| 73 61 67 65 20 64 65 73 | 63 72 69 70 74 6f 72 0a |sage des|criptor.|
|00003ad0| 20 09 52 32 20 3d 20 46 | 6c 61 67 73 0a 45 78 69 | .R2 = F|lags.Exi|
|00003ae0| 74 0a 20 09 52 30 20 3d | 20 41 6d 6f 75 6e 74 20 |t. .R0 =| Amount |
|00003af0| 6f 66 20 64 61 74 61 20 | 72 65 63 65 69 76 65 64 |of data |received|
|00003b00| 0a 0a 54 68 69 73 20 63 | 61 6c 6c 20 62 65 68 61 |..This c|all beha|
|00003b10| 76 65 73 20 69 6e 20 74 | 68 65 20 73 61 6d 65 20 |ves in t|he same |
|00003b20| 77 61 79 20 61 73 20 3c | 53 6f 63 6b 65 74 5f 52 |way as <|Socket_R|
|00003b30| 65 63 76 66 72 6f 6d 3e | 2c 20 65 78 63 65 70 74 |ecvfrom>|, except|
|00003b40| 20 74 68 61 74 20 74 68 | 65 20 6d 65 73 73 61 67 | that th|e messag|
|00003b50| 65 20 64 65 73 63 72 69 | 70 74 6f 72 20 69 73 20 |e descri|ptor is |
|00003b60| 75 73 65 64 20 74 6f 20 | 69 6e 64 69 63 61 74 65 |used to |indicate|
|00003b70| 20 77 68 65 72 65 20 74 | 68 65 20 61 64 64 72 65 | where t|he addre|
|00003b80| 73 73 20 73 68 6f 75 6c | 64 20 62 65 20 70 6c 61 |ss shoul|d be pla|
|00003b90| 63 65 64 20 61 6e 64 20 | 74 6f 20 67 69 76 65 20 |ced and |to give |
|00003ba0| 61 20 6c 69 73 74 20 6f | 66 20 62 75 66 66 65 72 |a list o|f buffer|
|00003bb0| 73 20 74 6f 20 72 65 74 | 75 72 6e 20 74 68 65 20 |s to ret|urn the |
|00003bc0| 64 61 74 61 20 69 6e 2e | 20 54 68 65 20 66 6f 72 |data in.| The for|
|00003bd0| 6d 61 74 20 6f 66 20 74 | 68 65 20 6d 65 73 73 61 |mat of t|he messa|
|00003be0| 67 65 20 64 65 73 63 72 | 69 70 74 6f 72 20 69 73 |ge descr|iptor is|
|00003bf0| 3a 0a 0a 20 09 52 31 09 | 2b 20 30 20 20 3d 20 50 |:.. .R1.|+ 0 = P|
|00003c00| 6f 69 6e 74 65 72 20 74 | 6f 20 61 64 64 72 65 73 |ointer t|o addres|
|00003c10| 73 20 74 6f 20 62 65 20 | 66 69 6c 6c 65 64 20 69 |s to be |filled i|
|00003c20| 6e 0a 20 09 20 09 2b 20 | 34 20 20 3d 20 53 69 7a |n. . .+ |4 = Siz|
|00003c30| 65 20 6f 66 20 73 75 70 | 70 6c 69 65 64 20 61 64 |e of sup|plied ad|
|00003c40| 64 72 65 73 73 20 62 6c | 6f 63 6b 0a 20 09 20 09 |dress bl|ock. . .|
|00003c50| 2b 20 38 20 20 3d 20 50 | 6f 69 6e 74 65 72 20 74 |+ 8 = P|ointer t|
|00003c60| 6f 20 61 72 72 61 79 20 | 6f 66 20 62 75 66 66 65 |o array |of buffe|
|00003c70| 72 20 64 65 73 63 72 69 | 70 74 6f 72 73 0a 20 09 |r descri|ptors. .|
|00003c80| 20 09 2b 20 31 32 20 3d | 20 4e 75 6d 62 65 72 20 | .+ 12 =| Number |
|00003c90| 6f 66 20 62 75 66 66 65 | 72 20 64 65 73 63 72 69 |of buffe|r descri|
|00003ca0| 70 74 6f 72 73 20 69 6e | 20 75 73 65 0a 20 09 20 |ptors in| use. . |
|00003cb0| 09 2b 20 31 36 20 3d 20 | 50 6f 69 6e 74 65 72 20 |.+ 16 = |Pointer |
|00003cc0| 74 6f 20 6c 69 73 74 20 | 6f 66 20 61 63 63 65 73 |to list |of acces|
|00003cd0| 73 20 72 69 67 68 74 73 | 20 28 75 6e 75 73 65 64 |s rights| (unused|
|00003ce0| 20 62 79 20 46 72 65 65 | 4e 65 74 29 0a 20 09 20 | by Free|Net). . |
|00003cf0| 09 2b 20 32 30 20 3d 20 | 53 69 7a 65 20 6f 66 20 |.+ 20 = |Size of |
|00003d00| 61 63 63 65 73 73 20 72 | 69 67 68 74 73 20 6c 69 |access r|ights li|
|00003d10| 73 74 0a 20 09 20 09 2b | 20 32 34 20 3d 20 46 6c |st. . .+| 24 = Fl|
|00003d20| 61 67 73 20 66 6f 72 20 | 72 65 63 65 69 76 65 64 |ags for |received|
|00003d30| 20 64 61 74 61 0a 0a 45 | 61 63 68 20 62 75 66 66 | data..E|ach buff|
|00003d40| 65 72 20 64 65 73 63 72 | 69 70 74 6f 72 20 63 6f |er descr|iptor co|
|00003d50| 6e 73 69 73 74 73 20 6f | 66 20 74 77 6f 20 77 6f |nsists o|f two wo|
|00003d60| 72 64 73 2e 20 54 68 65 | 20 66 69 72 73 74 20 69 |rds. The| first i|
|00003d70| 73 20 61 20 70 6f 69 6e | 74 65 72 20 74 6f 20 74 |s a poin|ter to t|
|00003d80| 68 65 20 62 75 66 66 65 | 72 2c 20 61 6e 64 20 74 |he buffe|r, and t|
|00003d90| 68 65 20 73 65 63 6f 6e | 64 20 74 68 65 20 73 69 |he secon|d the si|
|00003da0| 7a 65 20 6f 66 20 74 68 | 65 20 62 75 66 66 65 72 |ze of th|e buffer|
|00003db0| 2e 20 54 68 65 20 66 6c | 61 67 73 20 77 68 69 63 |. The fl|ags whic|
|00003dc0| 68 20 63 61 6e 20 62 65 | 20 72 65 74 75 72 6e 65 |h can be| returne|
|00003dd0| 64 20 69 6e 20 74 68 65 | 20 6d 65 73 73 61 67 65 |d in the| message|
|00003de0| 20 64 65 73 63 72 69 70 | 74 6f 72 20 61 72 65 3a | descrip|tor are:|
|00003df0| 0a 0a 20 09 3c 4d 53 47 | 5f 54 52 55 4e 43 3d 3e |.. .<MSG|_TRUNC=>|
|00003e00| 63 6f 6e 73 74 61 6e 74 | 73 3e 20 20 4d 65 73 73 |constant|s> Mess|
|00003e10| 61 67 65 20 77 61 73 20 | 74 72 75 6e 63 61 74 65 |age was |truncate|
|00003e20| 64 2e 0a 0a 20 09 3c 4d | 53 47 5f 45 4f 52 3d 3e |d... .<M|SG_EOR=>|
|00003e30| 63 6f 6e 73 74 61 6e 74 | 73 3e 20 20 54 68 69 73 |constant|s> This|
|00003e40| 20 64 61 74 61 20 63 6f | 6d 70 6c 65 74 65 73 20 | data co|mpletes |
|00003e50| 61 20 72 65 63 6f 72 64 | 2e 00 00 00 44 41 54 41 |a record|....DATA|
|00003e60| a3 05 00 00 53 6f 63 6b | 65 74 5f 53 65 6c 65 63 |....Sock|et_Selec|
|00003e70| 74 20 20 28 26 34 31 32 | 31 31 29 20 20 73 65 6c |t (&412|11) sel|
|00003e80| 65 63 74 28 29 0a 45 6e | 74 72 79 0a 20 09 52 30 |ect().En|try. .R0|
|00003e90| 20 3d 20 4e 75 6d 62 65 | 72 20 6f 66 20 64 65 73 | = Numbe|r of des|
|00003ea0| 63 72 69 70 74 6f 72 73 | 20 74 6f 20 63 6f 6e 73 |criptors| to cons|
|00003eb0| 69 64 65 72 20 69 6e 20 | 65 61 63 68 20 73 65 74 |ider in |each set|
|00003ec0| 0a 20 09 52 31 20 3d 20 | 50 6f 69 6e 74 65 72 20 |. .R1 = |Pointer |
|00003ed0| 74 6f 20 72 65 61 64 20 | 64 65 73 63 72 69 70 74 |to read |descript|
|00003ee0| 6f 72 20 73 65 74 0a 20 | 09 52 32 20 3d 20 50 6f |or set. |.R2 = Po|
|00003ef0| 69 6e 74 65 72 20 74 6f | 20 77 72 69 74 65 20 64 |inter to| write d|
|00003f00| 65 73 63 72 69 70 74 6f | 72 20 73 65 74 0a 20 09 |escripto|r set. .|
|00003f10| 52 33 20 3d 20 50 6f 69 | 6e 74 65 72 20 74 6f 20 |R3 = Poi|nter to |
|00003f20| 65 78 63 65 70 74 69 6f | 6e 20 64 65 73 63 72 69 |exceptio|n descri|
|00003f30| 70 74 6f 72 20 73 65 74 | 0a 20 09 52 34 20 3d 20 |ptor set|. .R4 = |
|00003f40| 50 6f 69 6e 74 65 72 20 | 74 6f 20 74 69 6d 65 6f |Pointer |to timeo|
|00003f50| 75 74 20 62 6c 6f 63 6b | 0a 45 78 69 74 0a 20 09 |ut block|.Exit. .|
|00003f60| 4e 75 6d 62 65 72 20 6f | 66 20 72 65 61 64 79 20 |Number o|f ready |
|00003f70| 64 65 73 63 72 69 70 74 | 6f 72 73 0a 0a 54 68 69 |descript|ors..Thi|
|00003f80| 73 20 63 61 6c 6c 20 70 | 6f 6c 6c 73 20 61 20 73 |s call p|olls a s|
|00003f90| 70 65 63 69 66 69 65 64 | 20 67 72 6f 75 70 73 20 |pecified| groups |
|00003fa0| 6f 66 20 73 6f 63 6b 65 | 74 73 20 74 6f 20 73 65 |of socke|ts to se|
|00003fb0| 65 20 77 68 69 63 68 20 | 61 72 65 20 72 65 61 64 |e which |are read|
|00003fc0| 79 20 66 6f 72 20 72 65 | 61 64 69 6e 67 2c 20 77 |y for re|ading, w|
|00003fd0| 68 69 63 68 20 61 72 65 | 20 72 65 61 64 79 20 66 |hich are| ready f|
|00003fe0| 6f 72 20 77 72 69 74 69 | 6e 67 20 61 6e 64 20 77 |or writi|ng and w|
|00003ff0| 68 69 63 68 20 68 61 64 | 20 65 78 63 65 70 74 69 |hich had| excepti|
|00004000| 6f 6e 61 6c 20 63 6f 6e | 64 69 74 69 6f 6e 73 20 |onal con|ditions |
|00004010| 70 65 6e 64 69 6e 67 2e | 0a 0a 45 61 63 68 20 6f |pending.|..Each o|
|00004020| 66 20 74 68 65 20 74 68 | 72 65 65 20 64 65 73 63 |f the th|ree desc|
|00004030| 72 69 70 74 6f 72 20 73 | 65 74 73 20 69 73 20 61 |riptor s|ets is a|
|00004040| 20 62 69 74 6d 61 73 6b | 2c 20 77 68 65 72 65 20 | bitmask|, where |
|00004050| 62 69 74 20 7a 65 72 6f | 20 72 65 66 65 72 73 20 |bit zero| refers |
|00004060| 74 6f 20 73 6f 63 6b 65 | 74 20 7a 65 72 6f 2c 20 |to socke|t zero, |
|00004070| 62 69 74 20 6f 6e 65 20 | 74 6f 20 73 6f 63 6b 65 |bit one |to socke|
|00004080| 74 20 6f 6e 65 20 61 6e | 64 20 73 6f 20 6f 6e 2e |t one an|d so on.|
|00004090| 20 4f 6e 6c 79 20 74 68 | 6f 73 65 20 73 6f 63 6b | Only th|ose sock|
|000040a0| 65 74 73 20 77 68 6f 73 | 65 20 62 69 74 20 69 73 |ets whos|e bit is|
|000040b0| 20 73 65 74 20 69 6e 20 | 61 20 6d 61 73 6b 20 77 | set in |a mask w|
|000040c0| 69 6c 6c 20 62 65 20 63 | 6f 6e 73 69 64 65 72 65 |ill be c|onsidere|
|000040d0| 64 20 77 68 65 6e 20 70 | 65 72 66 6f 72 6d 69 6e |d when p|erformin|
|000040e0| 67 20 74 68 65 20 63 68 | 65 63 6b 73 2e 20 41 73 |g the ch|ecks. As|
|000040f0| 20 46 72 65 65 4e 65 74 | 20 63 75 72 72 65 6e 74 | FreeNet| current|
|00004100| 6c 79 20 73 75 70 70 6f | 72 74 73 20 31 32 38 20 |ly suppo|rts 128 |
|00004110| 73 6f 63 6b 65 74 73 2c | 20 74 68 65 20 62 69 74 |sockets,| the bit|
|00004120| 6d 61 73 6b 73 20 61 72 | 65 20 61 72 72 61 79 73 |masks ar|e arrays|
|00004130| 20 6f 66 20 66 6f 75 72 | 20 77 6f 72 64 73 20 2d | of four| words -|
|00004140| 20 64 65 73 63 72 69 70 | 74 6f 72 73 20 30 20 74 | descrip|tors 0 t|
|00004150| 6f 20 33 31 20 61 72 65 | 20 69 6e 20 74 68 65 20 |o 31 are| in the |
|00004160| 66 69 72 73 74 20 77 6f | 72 64 20 61 6e 64 20 73 |first wo|rd and s|
|00004170| 6f 20 6f 6e 2e 0a 0a 54 | 68 65 20 76 61 6c 75 65 |o on...T|he value|
|00004180| 20 69 6e 20 52 30 20 69 | 73 20 74 68 65 20 6e 75 | in R0 i|s the nu|
|00004190| 6d 62 65 72 20 6f 66 20 | 62 69 74 73 20 69 6e 20 |mber of |bits in |
|000041a0| 74 68 65 20 64 65 73 63 | 72 69 70 74 6f 72 20 73 |the desc|riptor s|
|000041b0| 65 74 73 20 77 68 69 63 | 68 20 73 68 6f 75 6c 64 |ets whic|h should|
|000041c0| 20 62 65 20 63 6f 6e 73 | 69 64 65 72 65 64 20 61 | be cons|idered a|
|000041d0| 73 20 68 61 76 69 6e 67 | 20 6d 65 61 6e 69 6e 67 |s having| meaning|
|000041e0| 2c 20 73 6f 20 69 66 20 | 52 30 20 69 73 20 39 20 |, so if |R0 is 9 |
|000041f0| 6f 6e 6c 79 20 74 68 65 | 20 66 69 72 73 74 20 39 |only the| first 9|
|00004200| 20 62 69 74 73 20 28 64 | 65 73 63 72 69 70 74 6f | bits (d|escripto|
|00004210| 72 73 20 30 20 74 6f 20 | 38 29 20 77 69 6c 6c 20 |rs 0 to |8) will |
|00004220| 62 65 20 63 6f 6e 73 69 | 64 65 72 65 64 2e 0a 0a |be consi|dered...|
|00004230| 54 68 69 73 20 63 61 6c | 6c 20 77 69 6c 6c 20 72 |This cal|l will r|
|00004240| 65 74 75 72 6e 20 61 73 | 20 73 6f 6f 6e 20 61 73 |eturn as| soon as|
|00004250| 20 6f 6e 65 20 6f 72 20 | 6d 6f 72 65 20 6f 66 20 | one or |more of |
|00004260| 74 68 65 20 73 6f 63 6b | 65 74 73 20 62 65 69 6e |the sock|ets bein|
|00004270| 67 20 74 65 73 74 65 64 | 20 69 73 20 72 65 61 64 |g tested| is read|
|00004280| 79 20 6f 72 20 77 68 65 | 6e 20 61 20 74 69 6d 65 |y or whe|n a time|
|00004290| 6f 75 74 20 6f 63 63 75 | 72 73 2e 20 50 61 73 73 |out occu|rs. Pass|
|000042a0| 69 6e 67 20 61 20 6e 75 | 6c 6c 20 70 6f 69 6e 74 |ing a nu|ll point|
|000042b0| 65 72 20 66 6f 72 20 74 | 68 65 20 74 69 6d 65 6f |er for t|he timeo|
|000042c0| 75 74 20 6d 65 61 6e 73 | 20 74 68 65 20 63 61 6c |ut means| the cal|
|000042d0| 6c 20 77 69 6c 6c 20 6e | 65 76 65 72 20 74 69 6d |l will n|ever tim|
|000042e0| 65 6f 75 74 2c 20 61 6e | 64 20 77 69 6c 6c 20 62 |eout, an|d will b|
|000042f0| 6c 6f 63 6b 20 75 6e 74 | 69 6c 20 61 20 73 6f 63 |lock unt|il a soc|
|00004300| 6b 65 74 20 69 73 20 72 | 65 61 64 79 2e 20 54 68 |ket is r|eady. Th|
|00004310| 65 20 74 69 6d 65 6f 75 | 74 20 74 61 6b 65 73 20 |e timeou|t takes |
|00004320| 74 68 65 20 66 6f 6c 6c | 6f 77 69 6e 67 20 66 6f |the foll|owing fo|
|00004330| 72 6d 3a 0a 0a 20 09 52 | 34 09 2b 20 30 20 3d 20 |rm:.. .R|4.+ 0 = |
|00004340| 4e 75 6d 62 65 72 20 6f | 66 20 73 65 63 6f 6e 64 |Number o|f second|
|00004350| 73 20 74 6f 20 77 61 69 | 74 0a 20 09 20 09 2b 20 |s to wai|t. . .+ |
|00004360| 34 20 3d 20 4e 75 6d 62 | 65 72 20 6f 66 20 6d 69 |4 = Numb|er of mi|
|00004370| 63 72 6f 73 65 63 6f 6e | 64 73 20 74 6f 20 77 61 |crosecon|ds to wa|
|00004380| 69 74 0a 0a 41 20 74 69 | 6d 65 6f 75 74 20 77 69 |it..A ti|meout wi|
|00004390| 74 68 20 62 6f 74 68 20 | 66 69 65 6c 64 73 20 73 |th both |fields s|
|000043a0| 65 74 20 74 6f 20 7a 65 | 72 6f 20 77 69 6c 6c 20 |et to ze|ro will |
|000043b0| 63 61 75 73 65 20 74 68 | 65 20 63 61 6c 6c 20 74 |cause th|e call t|
|000043c0| 6f 20 72 65 74 75 72 6e | 20 69 6d 6d 65 64 69 61 |o return| immedia|
|000043d0| 74 65 6c 79 2c 20 72 65 | 67 61 72 64 6c 65 73 73 |tely, re|gardless|
|000043e0| 20 6f 66 20 68 6f 77 20 | 6d 61 6e 79 20 73 6f 63 | of how |many soc|
|000043f0| 6b 65 74 73 20 61 72 65 | 20 72 65 61 64 79 2e 00 |kets are| ready..|
|00004400| 44 41 54 41 51 03 00 00 | 53 6f 63 6b 65 74 5f 53 |DATAQ...|Socket_S|
|00004410| 65 6e 64 20 20 28 26 34 | 31 32 30 38 29 20 20 73 |end (&4|1208) s|
|00004420| 65 6e 64 28 29 0a 45 6e | 74 72 79 0a 20 09 52 30 |end().En|try. .R0|
|00004430| 20 3d 20 53 6f 63 6b 65 | 74 20 64 65 73 63 72 69 | = Socke|t descri|
|00004440| 70 74 6f 72 0a 20 09 52 | 31 20 3d 20 50 6f 69 6e |ptor. .R|1 = Poin|
|00004450| 74 65 72 20 74 6f 20 64 | 61 74 61 20 74 6f 20 62 |ter to d|ata to b|
|00004460| 65 20 73 65 6e 74 0a 20 | 09 52 32 20 3d 20 53 69 |e sent. |.R2 = Si|
|00004470| 7a 65 20 6f 66 20 62 75 | 66 66 65 72 0a 20 09 52 |ze of bu|ffer. .R|
|00004480| 33 20 3d 20 46 6c 61 67 | 73 0a 45 78 69 74 0a 20 |3 = Flag|s.Exit. |
|00004490| 09 52 30 20 3d 20 41 6d | 6f 75 6e 74 20 6f 66 20 |.R0 = Am|ount of |
|000044a0| 64 61 74 61 20 73 65 6e | 74 0a 0a 54 68 69 73 20 |data sen|t..This |
|000044b0| 63 61 6c 6c 20 73 65 6e | 64 73 20 64 61 74 61 20 |call sen|ds data |
|000044c0| 6f 6e 20 61 20 73 6f 63 | 6b 65 74 2e 20 49 6e 20 |on a soc|ket. In |
|000044d0| 74 68 65 20 63 61 73 65 | 20 6f 66 20 64 61 74 61 |the case| of data|
|000044e0| 67 72 61 6d 20 61 6e 64 | 20 72 61 77 20 73 6f 63 |gram and| raw soc|
|000044f0| 6b 65 74 73 2c 20 61 20 | 73 69 6e 67 6c 65 20 64 |kets, a |single d|
|00004500| 61 74 61 67 72 61 6d 20 | 63 6f 6e 74 61 69 6e 69 |atagram |containi|
|00004510| 6e 67 20 74 68 65 20 64 | 61 74 61 20 77 69 6c 6c |ng the d|ata will|
|00004520| 20 62 65 20 73 65 6e 74 | 2c 20 61 6e 64 20 3c 45 | be sent|, and <E|
|00004530| 4d 53 47 53 49 5a 45 3d | 3e 65 72 72 6f 72 73 3e |MSGSIZE=|>errors>|
|00004540| 20 77 69 6c 6c 20 62 65 | 20 72 65 74 75 72 6e 65 | will be| returne|
|00004550| 64 20 69 66 20 74 68 65 | 20 64 61 74 61 20 69 73 |d if the| data is|
|00004560| 20 74 6f 6f 20 6c 61 72 | 67 65 20 74 6f 20 62 65 | too lar|ge to be|
|00004570| 20 73 65 6e 74 20 69 6e | 20 74 68 69 73 20 77 61 | sent in| this wa|
|00004580| 79 2e 20 46 6f 72 20 73 | 74 72 65 61 6d 20 73 6f |y. For s|tream so|
|00004590| 63 6b 65 74 73 2c 20 74 | 68 65 20 63 61 6c 6c 20 |ckets, t|he call |
|000045a0| 77 69 6c 6c 20 62 6c 6f | 63 6b 20 75 6e 74 69 6c |will blo|ck until|
|000045b0| 20 61 6c 6c 20 74 68 65 | 20 64 61 74 61 20 68 61 | all the| data ha|
|000045c0| 73 20 62 65 65 6e 20 73 | 65 6e 74 2c 20 75 6e 6c |s been s|ent, unl|
|000045d0| 65 73 73 20 74 68 65 20 | 73 6f 63 6b 65 74 20 68 |ess the |socket h|
|000045e0| 61 73 20 62 65 65 6e 20 | 6d 61 72 6b 65 64 20 6e |as been |marked n|
|000045f0| 6f 6e 2d 62 6c 6f 63 6b | 69 6e 67 2c 20 69 6e 20 |on-block|ing, in |
|00004600| 77 68 69 63 68 20 63 61 | 73 65 20 61 73 20 6d 75 |which ca|se as mu|
|00004610| 63 68 20 64 61 74 61 20 | 61 73 20 70 6f 73 73 69 |ch data |as possi|
|00004620| 62 6c 65 20 77 69 6c 6c | 20 62 65 20 73 65 6e 74 |ble will| be sent|
|00004630| 2e 0a 0a 56 61 72 69 6f | 75 73 20 62 69 74 73 20 |...Vario|us bits |
|00004640| 69 6e 20 74 68 65 20 66 | 6c 61 67 73 20 77 6f 72 |in the f|lags wor|
|00004650| 64 20 63 61 6e 20 62 65 | 20 73 65 74 20 74 6f 20 |d can be| set to |
|00004660| 61 66 66 65 63 74 20 68 | 6f 77 20 68 6f 77 20 74 |affect h|ow how t|
|00004670| 68 65 20 73 65 6e 64 20 | 69 73 20 70 65 72 66 6f |he send |is perfo|
|00004680| 72 6d 65 64 3a 0a 0a 20 | 09 3c 4d 53 47 5f 4f 4f |rmed:.. |.<MSG_OO|
|00004690| 42 3d 3e 63 6f 6e 73 74 | 61 6e 74 73 3e 09 53 65 |B=>const|ants>.Se|
|000046a0| 6e 64 20 64 61 74 61 20 | 61 73 20 6f 75 74 2d 6f |nd data |as out-o|
|000046b0| 66 2d 62 61 6e 64 20 64 | 61 74 61 20 69 6e 73 74 |f-band d|ata inst|
|000046c0| 65 61 64 20 6f 66 20 6e | 6f 72 6d 61 6c 20 69 6e |ead of n|ormal in|
|000046d0| 2d 62 61 6e 64 20 64 61 | 74 61 2e 0a 0a 42 65 63 |-band da|ta...Bec|
|000046e0| 61 75 73 65 20 74 68 69 | 73 20 63 61 6c 6c 20 64 |ause thi|s call d|
|000046f0| 6f 65 73 20 6e 6f 74 20 | 73 70 65 63 69 66 79 20 |oes not |specify |
|00004700| 74 68 65 20 61 64 64 72 | 65 73 73 20 74 6f 20 73 |the addr|ess to s|
|00004710| 65 6e 64 20 74 6f 2c 20 | 74 68 65 20 73 6f 63 6b |end to, |the sock|
|00004720| 65 74 20 75 73 65 64 20 | 66 6f 72 20 74 68 69 73 |et used |for this|
|00004730| 20 63 61 6c 6c 20 6d 75 | 73 74 20 62 65 20 61 20 | call mu|st be a |
|00004740| 63 6f 6e 6e 65 63 74 65 | 64 20 73 6f 63 6b 65 74 |connecte|d socket|
|00004750| 2e 00 00 00 44 41 54 41 | ae 01 00 00 53 6f 63 6b |....DATA|....Sock|
|00004760| 65 74 5f 53 65 6e 64 6d | 73 67 20 20 28 26 34 31 |et_Sendm|sg (&41|
|00004770| 32 30 41 29 20 20 73 65 | 6e 64 6d 73 67 28 29 0a |20A) se|ndmsg().|
|00004780| 45 6e 74 72 79 0a 20 09 | 52 30 20 3d 20 53 6f 63 |Entry. .|R0 = Soc|
|00004790| 6b 65 74 20 64 65 73 63 | 72 69 70 74 6f 72 0a 20 |ket desc|riptor. |
|000047a0| 09 52 31 20 3d 20 50 6f | 69 6e 74 65 72 20 74 6f |.R1 = Po|inter to|
|000047b0| 20 6d 65 73 73 61 67 65 | 20 64 65 73 63 72 69 70 | message| descrip|
|000047c0| 74 6f 72 0a 20 09 52 32 | 20 3d 20 46 6c 61 67 73 |tor. .R2| = Flags|
|000047d0| 0a 45 78 69 74 0a 20 09 | 52 30 20 3d 20 41 6d 6f |.Exit. .|R0 = Amo|
|000047e0| 75 6e 74 20 6f 66 20 64 | 61 74 61 20 73 65 6e 74 |unt of d|ata sent|
|000047f0| 0a 0a 54 68 69 73 20 63 | 61 6c 6c 20 62 65 68 61 |..This c|all beha|
|00004800| 76 65 73 20 69 6e 20 74 | 68 65 20 73 61 6d 65 20 |ves in t|he same |
|00004810| 77 61 79 20 61 73 20 3c | 53 6f 63 6b 65 74 5f 53 |way as <|Socket_S|
|00004820| 65 6e 64 74 6f 3e 2c 20 | 65 78 63 65 70 74 20 74 |endto>, |except t|
|00004830| 68 61 74 20 74 68 65 20 | 6d 65 73 73 61 67 65 20 |hat the |message |
|00004840| 64 65 73 63 72 69 70 74 | 6f 72 20 69 73 20 75 73 |descript|or is us|
|00004850| 65 64 20 74 6f 20 69 6e | 64 69 63 61 74 65 20 77 |ed to in|dicate w|
|00004860| 68 65 72 65 20 74 68 65 | 20 61 64 64 72 65 73 73 |here the| address|
|00004870| 20 73 68 6f 75 6c 64 20 | 62 65 20 74 61 6b 65 6e | should |be taken|
|00004880| 20 66 72 6f 6d 20 61 6e | 64 20 74 6f 20 67 69 76 | from an|d to giv|
|00004890| 65 20 61 20 6c 69 73 74 | 20 6f 66 20 62 75 66 66 |e a list| of buff|
|000048a0| 65 72 73 20 63 6f 6e 74 | 61 69 6e 69 6e 67 20 74 |ers cont|aining t|
|000048b0| 68 65 20 64 61 74 61 20 | 69 6e 2e 20 54 68 65 20 |he data |in. The |
|000048c0| 66 6f 72 6d 61 74 20 6f | 66 20 74 68 65 20 6d 65 |format o|f the me|
|000048d0| 73 73 61 67 65 20 64 65 | 73 63 72 69 70 74 6f 72 |ssage de|scriptor|
|000048e0| 20 69 73 20 61 73 20 67 | 69 76 65 6e 20 66 6f 72 | is as g|iven for|
|000048f0| 20 3c 53 6f 63 6b 65 74 | 5f 52 65 63 76 6d 73 67 | <Socket|_Recvmsg|
|00004900| 3e 2e 00 00 44 41 54 41 | bc 02 00 00 53 6f 63 6b |>...DATA|....Sock|
|00004910| 65 74 5f 53 65 6e 64 74 | 6f 20 20 28 26 34 31 32 |et_Sendt|o (&412|
|00004920| 30 39 29 20 20 73 65 6e | 64 74 6f 28 29 0a 45 6e |09) sen|dto().En|
|00004930| 74 72 79 0a 20 09 52 30 | 20 3d 20 53 6f 63 6b 65 |try. .R0| = Socke|
|00004940| 74 20 64 65 73 63 72 69 | 70 74 6f 72 0a 20 09 52 |t descri|ptor. .R|
|00004950| 31 20 3d 20 50 6f 69 6e | 74 65 72 20 74 6f 20 64 |1 = Poin|ter to d|
|00004960| 61 74 61 20 74 6f 20 62 | 65 20 73 65 6e 74 0a 20 |ata to b|e sent. |
|00004970| 09 52 32 20 3d 20 53 69 | 7a 65 20 6f 66 20 62 75 |.R2 = Si|ze of bu|
|00004980| 66 66 65 72 0a 20 09 52 | 33 20 3d 20 46 6c 61 67 |ffer. .R|3 = Flag|
|00004990| 73 0a 20 09 52 34 20 3d | 20 50 6f 69 6e 74 65 72 |s. .R4 =| Pointer|
|000049a0| 20 74 6f 20 61 64 64 72 | 65 73 73 20 74 6f 20 73 | to addr|ess to s|
|000049b0| 65 6e 64 20 74 6f 0a 20 | 09 52 35 20 3d 20 53 69 |end to. |.R5 = Si|
|000049c0| 7a 65 20 6f 66 20 73 75 | 70 70 6c 69 65 64 20 61 |ze of su|pplied a|
|000049d0| 64 64 72 65 73 73 20 62 | 6c 6f 63 6b 0a 45 78 69 |ddress b|lock.Exi|
|000049e0| 74 0a 20 09 52 30 20 3d | 20 41 6d 6f 75 6e 74 20 |t. .R0 =| Amount |
|000049f0| 6f 66 20 64 61 74 61 20 | 73 65 6e 74 0a 0a 54 68 |of data |sent..Th|
|00004a00| 69 73 20 63 61 6c 6c 20 | 70 65 72 66 6f 72 6d 73 |is call |performs|
|00004a10| 20 74 68 65 20 73 61 6d | 65 20 6a 6f 62 20 61 73 | the sam|e job as|
|00004a20| 20 3c 53 6f 63 6b 65 74 | 5f 53 65 6e 64 3e 2c 20 | <Socket|_Send>, |
|00004a30| 65 78 63 65 70 74 20 74 | 68 61 74 20 74 68 65 20 |except t|hat the |
|00004a40| 72 65 6d 6f 74 65 20 61 | 64 64 72 65 73 73 20 69 |remote a|ddress i|
|00004a50| 73 20 73 70 65 63 69 66 | 69 65 64 20 73 6f 20 74 |s specif|ied so t|
|00004a60| 68 61 74 20 69 74 20 63 | 61 6e 20 62 65 20 75 73 |hat it c|an be us|
|00004a70| 65 64 20 6f 6e 20 75 6e | 63 6f 6e 6e 65 63 74 65 |ed on un|connecte|
|00004a80| 64 20 73 6f 63 6b 65 74 | 73 2e 20 54 68 69 73 20 |d socket|s. This |
|00004a90| 63 61 6c 6c 20 69 73 20 | 6f 6e 6c 79 20 75 73 65 |call is |only use|
|00004aa0| 66 75 6c 20 66 6f 72 20 | 73 6f 63 6b 65 74 73 20 |ful for |sockets |
|00004ab0| 74 68 61 74 20 64 6f 20 | 6e 6f 74 20 72 65 71 75 |that do |not requ|
|00004ac0| 69 72 65 20 61 20 63 6f | 6e 6e 65 63 74 69 6f 6e |ire a co|nnection|
|00004ad0| 20 73 75 63 68 20 61 73 | 20 74 68 6f 73 65 20 75 | such as| those u|
|00004ae0| 73 69 6e 67 20 74 68 65 | 20 55 44 50 20 70 72 6f |sing the| UDP pro|
|00004af0| 74 6f 63 6f 6c 2e 20 46 | 6f 72 20 73 6f 63 6b 65 |tocol. F|or socke|
|00004b00| 74 73 20 74 68 61 74 20 | 72 65 71 75 69 72 65 20 |ts that |require |
|00004b10| 61 20 63 6f 6e 6e 65 63 | 74 69 6f 6e 20 73 75 63 |a connec|tion suc|
|00004b20| 68 20 61 73 20 74 68 6f | 73 65 20 75 73 69 6e 67 |h as tho|se using|
|00004b30| 20 74 68 65 20 54 43 50 | 20 70 72 6f 74 6f 63 6f | the TCP| protoco|
|00004b40| 6c 2c 20 79 6f 75 20 6e | 65 65 64 20 74 6f 20 63 |l, you n|eed to c|
|00004b50| 61 6c 6c 20 3c 53 6f 63 | 6b 65 74 5f 43 6f 6e 6e |all <Soc|ket_Conn|
|00004b60| 65 63 74 3e 20 62 65 66 | 6f 72 65 20 79 6f 75 20 |ect> bef|ore you |
|00004b70| 63 61 6e 20 75 73 65 20 | 74 68 69 73 20 72 6f 75 |can use |this rou|
|00004b80| 74 69 6e 65 2c 20 61 6e | 64 20 74 68 65 20 61 64 |tine, an|d the ad|
|00004b90| 64 72 65 73 73 20 67 69 | 76 65 6e 20 74 6f 20 74 |dress gi|ven to t|
|00004ba0| 68 69 73 20 63 61 6c 6c | 20 69 73 20 74 68 65 6e |his call| is then|
|00004bb0| 20 69 67 6e 6f 72 65 64 | 20 61 6e 79 77 61 79 2e | ignored| anyway.|
|00004bc0| 44 41 54 41 4c 00 00 00 | 53 6f 63 6b 65 74 5f 53 |DATAL...|Socket_S|
|00004bd0| 65 6e 64 74 6f 73 6d 20 | 20 28 26 34 31 32 31 39 |endtosm | (&41219|
|00004be0| 29 0a 54 68 69 73 20 63 | 61 6c 6c 20 69 73 20 6e |).This c|all is n|
|00004bf0| 6f 74 20 73 75 70 70 6f | 72 74 65 64 20 62 79 20 |ot suppo|rted by |
|00004c00| 46 72 65 65 4e 65 74 20 | 79 65 74 2e 44 41 54 41 |FreeNet |yet.DATA|
|00004c10| 8d 0c 00 00 53 6f 63 6b | 65 74 5f 53 65 74 73 6f |....Sock|et_Setso|
|00004c20| 63 6b 6f 70 74 20 20 28 | 26 34 31 32 30 43 29 20 |ckopt (|&4120C) |
|00004c30| 20 73 65 74 73 6f 63 6b | 6f 70 74 28 29 0a 45 6e | setsock|opt().En|
|00004c40| 74 72 79 0a 20 09 52 30 | 20 3d 20 53 6f 63 6b 65 |try. .R0| = Socke|
|00004c50| 74 20 64 65 73 63 72 69 | 70 74 6f 72 0a 20 09 52 |t descri|ptor. .R|
|00004c60| 31 20 3d 20 4f 70 74 69 | 6f 6e 20 6c 65 76 65 6c |1 = Opti|on level|
|00004c70| 0a 20 09 52 32 20 3d 20 | 4f 70 74 69 6f 6e 0a 20 |. .R2 = |Option. |
|00004c80| 09 52 33 20 3d 20 50 6f | 69 6e 74 65 72 20 74 6f |.R3 = Po|inter to|
|00004c90| 20 6f 70 74 69 6f 6e 20 | 76 61 6c 75 65 0a 20 09 | option |value. .|
|00004ca0| 52 34 20 3d 20 53 69 7a | 65 20 6f 66 20 6f 70 74 |R4 = Siz|e of opt|
|00004cb0| 69 6f 6e 20 76 61 6c 75 | 65 0a 45 78 69 74 0a 20 |ion valu|e.Exit. |
|00004cc0| 09 52 30 20 63 6f 72 72 | 75 70 74 65 64 0a 0a 54 |.R0 corr|upted..T|
|00004cd0| 68 69 73 20 69 73 20 75 | 73 65 64 20 74 6f 20 73 |his is u|sed to s|
|00004ce0| 65 74 20 61 20 70 61 72 | 74 69 63 75 6c 61 72 20 |et a par|ticular |
|00004cf0| 6f 70 74 69 6f 6e 20 6f | 6e 20 61 20 73 6f 63 6b |option o|n a sock|
|00004d00| 65 74 2e 20 54 68 65 20 | 6c 65 76 65 6c 20 69 73 |et. The |level is|
|00004d10| 20 65 69 74 68 65 72 20 | 3c 53 4f 4c 5f 53 4f 43 | either |<SOL_SOC|
|00004d20| 4b 45 54 3d 3e 63 6f 6e | 73 74 61 6e 74 73 3e 20 |KET=>con|stants> |
|00004d30| 66 6f 72 20 6f 70 74 69 | 6f 6e 73 20 61 70 70 6c |for opti|ons appl|
|00004d40| 69 63 61 62 6c 65 20 74 | 6f 20 61 6c 6c 20 73 6f |icable t|o all so|
|00004d50| 63 6b 65 74 73 2c 20 6f | 72 20 61 20 70 72 6f 74 |ckets, o|r a prot|
|00004d60| 6f 63 6f 6c 20 6e 75 6d | 62 65 72 20 66 6f 72 20 |ocol num|ber for |
|00004d70| 6f 70 74 69 6f 6e 73 20 | 61 70 70 6c 69 63 61 62 |options |applicab|
|00004d80| 6c 65 20 74 6f 20 61 20 | 63 65 72 74 61 69 6e 20 |le to a |certain |
|00004d90| 70 72 6f 74 6f 63 6f 6c | 2e 20 43 75 72 72 65 6e |protocol|. Curren|
|00004da0| 74 6c 79 20 73 75 70 70 | 6f 72 74 65 64 20 73 6f |tly supp|orted so|
|00004db0| 63 6b 65 74 20 6c 65 76 | 65 6c 20 6f 70 74 69 6f |cket lev|el optio|
|00004dc0| 6e 73 20 61 72 65 3a 0a | 0a 20 09 3c 53 4f 5f 52 |ns are:.|. .<SO_R|
|00004dd0| 45 55 53 45 41 44 44 52 | 3d 3e 63 6f 6e 73 74 61 |EUSEADDR|=>consta|
|00004de0| 6e 74 73 3e 09 45 6e 61 | 62 6c 65 73 20 6f 72 20 |nts>.Ena|bles or |
|00004df0| 64 69 73 61 62 6c 65 73 | 20 74 68 65 20 72 65 75 |disables| the reu|
|00004e00| 73 65 20 6f 66 20 6c 6f | 63 61 6c 20 61 64 64 72 |se of lo|cal addr|
|00004e10| 65 73 73 65 73 20 64 75 | 72 69 6e 67 20 74 68 65 |esses du|ring the|
|00004e20| 20 77 61 69 74 20 70 65 | 72 69 6f 64 20 74 68 61 | wait pe|riod tha|
|00004e30| 74 20 6e 6f 72 6d 61 6c | 6c 79 20 6f 63 63 75 72 |t normal|ly occur|
|00004e40| 73 20 77 68 65 6e 20 61 | 20 54 43 50 20 73 74 72 |s when a| TCP str|
|00004e50| 65 61 6d 20 73 6f 63 6b | 65 74 20 69 73 20 63 6c |eam sock|et is cl|
|00004e60| 6f 73 65 64 2e 20 54 68 | 65 20 61 72 67 75 6d 65 |osed. Th|e argume|
|00004e70| 6e 74 20 69 73 20 61 20 | 73 69 6e 67 6c 65 20 77 |nt is a |single w|
|00004e80| 6f 72 64 20 77 68 69 63 | 68 20 63 6f 6e 74 61 69 |ord whic|h contai|
|00004e90| 6e 73 20 7a 65 72 6f 20 | 74 6f 20 64 69 73 61 62 |ns zero |to disab|
|00004ea0| 6c 65 20 74 68 69 73 20 | 6f 70 74 69 6f 6e 2c 20 |le this |option, |
|00004eb0| 6f 72 20 61 20 6e 6f 6e | 2d 7a 65 72 6f 20 76 61 |or a non|-zero va|
|00004ec0| 6c 75 65 20 74 6f 20 65 | 6e 61 62 6c 65 20 69 74 |lue to e|nable it|
|00004ed0| 2e 0a 0a 20 09 3c 53 4f | 5f 4b 45 45 50 41 4c 49 |... .<SO|_KEEPALI|
|00004ee0| 56 45 3d 3e 63 6f 6e 73 | 74 61 6e 74 73 3e 09 45 |VE=>cons|tants>.E|
|00004ef0| 6e 61 62 6c 65 20 6f 72 | 20 64 69 73 61 62 6c 65 |nable or| disable|
|00004f00| 20 61 74 74 65 6d 70 74 | 73 20 62 79 20 46 72 65 | attempt|s by Fre|
|00004f10| 65 4e 65 74 20 74 6f 20 | 70 72 6f 62 65 20 74 68 |eNet to |probe th|
|00004f20| 65 20 72 65 6d 6f 74 65 | 20 65 6e 64 20 6f 66 20 |e remote| end of |
|00004f30| 61 20 54 43 50 20 63 6f | 6e 6e 65 63 74 69 6f 6e |a TCP co|nnection|
|00004f40| 20 77 68 65 6e 20 74 68 | 65 20 6c 69 6e 6b 20 68 | when th|e link h|
|00004f50| 61 73 20 62 65 65 6e 20 | 69 64 6c 65 20 66 6f 72 |as been |idle for|
|00004f60| 20 73 6f 6d 65 20 74 69 | 6d 65 2e 0a 0a 20 09 3c | some ti|me... .<|
|00004f70| 53 4f 5f 42 52 4f 41 44 | 43 41 53 54 3d 3e 63 6f |SO_BROAD|CAST=>co|
|00004f80| 6e 73 74 61 6e 74 73 3e | 09 45 6e 61 62 6c 65 20 |nstants>|.Enable |
|00004f90| 6f 72 20 64 69 73 61 62 | 6c 65 20 73 65 6e 64 69 |or disab|le sendi|
|00004fa0| 6e 67 20 6f 66 20 62 72 | 6f 61 64 63 61 73 74 20 |ng of br|oadcast |
|00004fb0| 70 61 63 6b 65 74 73 20 | 74 68 72 6f 75 67 68 20 |packets |through |
|00004fc0| 74 68 69 73 20 73 6f 63 | 6b 65 74 2e 0a 0a 09 3c |this soc|ket....<|
|00004fd0| 53 4f 5f 4c 49 4e 47 45 | 52 3d 3e 63 6f 6e 73 74 |SO_LINGE|R=>const|
|00004fe0| 61 6e 74 73 3e 09 43 6f | 6e 74 72 6f 6c 20 77 68 |ants>.Co|ntrol wh|
|00004ff0| 65 74 68 65 72 20 74 68 | 65 20 73 6f 63 6b 65 74 |ether th|e socket|
|00005000| 20 6c 69 6e 67 65 72 73 | 20 6f 6e 20 63 6c 6f 73 | lingers| on clos|
|00005010| 65 2e 20 54 68 65 20 61 | 72 67 75 6d 65 6e 74 20 |e. The a|rgument |
|00005020| 70 6f 69 6e 74 73 20 74 | 6f 20 74 77 6f 20 77 6f |points t|o two wo|
|00005030| 72 64 73 2c 20 74 68 65 | 20 66 69 72 73 74 20 6f |rds, the| first o|
|00005040| 66 20 77 68 69 63 68 20 | 69 73 20 61 20 62 6f 6f |f which |is a boo|
|00005050| 6c 65 61 6e 20 74 68 61 | 74 20 69 6e 64 69 63 61 |lean tha|t indica|
|00005060| 74 65 73 20 77 65 74 68 | 65 72 20 74 68 65 20 73 |tes weth|er the s|
|00005070| 6f 63 6b 65 74 20 77 61 | 69 74 73 20 66 6f 72 20 |ocket wa|its for |
|00005080| 64 61 74 61 20 74 6f 20 | 64 72 61 69 6e 20 77 68 |data to |drain wh|
|00005090| 65 6e 20 69 74 20 69 73 | 20 63 6c 6f 73 65 64 2c |en it is| closed,|
|000050a0| 20 61 6e 64 20 74 68 65 | 20 73 65 63 6f 6e 64 20 | and the| second |
|000050b0| 69 73 20 74 68 65 20 6c | 65 6e 67 74 68 20 6f 66 |is the l|ength of|
|000050c0| 20 74 69 6d 65 20 74 6f | 20 77 61 69 74 20 69 6e | time to| wait in|
|000050d0| 20 73 65 63 6f 6e 64 73 | 2e 0a 0a 20 09 3c 53 4f | seconds|... .<SO|
|000050e0| 5f 4f 4f 42 49 4e 4c 49 | 4e 45 3d 3e 63 6f 6e 73 |_OOBINLI|NE=>cons|
|000050f0| 74 61 6e 74 73 3e 09 43 | 6f 6e 74 72 6f 6c 20 77 |tants>.C|ontrol w|
|00005100| 68 65 74 68 65 72 20 4f | 4f 42 20 64 61 74 61 20 |hether O|OB data |
|00005110| 69 73 20 72 65 63 65 69 | 76 65 64 20 69 6e 6c 69 |is recei|ved inli|
|00005120| 6e 65 20 77 69 74 68 74 | 68 65 20 6e 6f 72 6d 61 |ne witht|he norma|
|00005130| 6c 20 64 61 74 61 2c 20 | 6f 72 20 6f 75 74 20 6f |l data, |or out o|
|00005140| 66 20 6c 69 6e 65 20 61 | 73 20 61 20 73 65 70 61 |f line a|s a sepa|
|00005150| 72 61 74 65 20 64 61 74 | 61 20 73 74 72 65 61 6d |rate dat|a stream|
|00005160| 2e 0a 0a 20 09 3c 53 4f | 5f 53 4e 44 42 55 46 3d |... .<SO|_SNDBUF=|
|00005170| 3e 63 6f 6e 73 74 61 6e | 74 73 3e 09 53 65 74 20 |>constan|ts>.Set |
|00005180| 74 68 65 20 73 69 7a 65 | 20 6f 66 20 74 68 65 20 |the size| of the |
|00005190| 73 65 6e 64 20 62 75 66 | 66 65 72 20 74 6f 20 74 |send buf|fer to t|
|000051a0| 68 65 20 76 61 6c 75 65 | 20 67 69 76 65 6e 20 62 |he value| given b|
|000051b0| 79 20 74 68 65 20 61 72 | 67 75 6d 65 6e 74 2c 20 |y the ar|gument, |
|000051c0| 77 68 69 63 68 20 69 73 | 20 61 20 73 69 6e 67 6c |which is| a singl|
|000051d0| 65 20 77 6f 72 64 2e 0a | 0a 20 09 3c 53 4f 5f 52 |e word..|. .<SO_R|
|000051e0| 43 56 42 55 46 3d 3e 63 | 6f 6e 73 74 61 6e 74 73 |CVBUF=>c|onstants|
|000051f0| 3e 09 53 65 74 20 74 68 | 65 20 73 69 7a 65 20 6f |>.Set th|e size o|
|00005200| 66 20 74 68 65 20 72 65 | 63 65 69 76 65 20 62 75 |f the re|ceive bu|
|00005210| 66 66 65 72 20 74 6f 20 | 74 68 65 20 76 61 6c 75 |ffer to |the valu|
|00005220| 65 20 67 69 76 65 6e 20 | 62 79 20 74 68 65 20 61 |e given |by the a|
|00005230| 72 67 75 6d 65 6e 74 2c | 20 77 68 69 63 68 20 69 |rgument,| which i|
|00005240| 73 20 61 20 73 69 6e 67 | 6c 65 20 77 6f 72 64 2e |s a sing|le word.|
|00005250| 0a 0a 20 09 3c 53 4f 5f | 53 4e 44 4c 4f 57 41 54 |.. .<SO_|SNDLOWAT|
|00005260| 3d 3e 63 6f 6e 73 74 61 | 6e 74 73 3e 09 53 65 74 |=>consta|nts>.Set|
|00005270| 20 74 68 65 20 6c 6f 77 | 20 77 61 74 65 72 20 6d | the low| water m|
|00005280| 61 72 6b 20 6f 66 20 74 | 68 65 20 73 65 6e 64 20 |ark of t|he send |
|00005290| 62 75 66 66 65 72 2e 20 | 54 68 65 20 73 74 61 63 |buffer. |The stac|
|000052a0| 6b 20 77 69 6c 6c 20 62 | 6c 6f 63 6b 20 61 20 73 |k will b|lock a s|
|000052b0| 65 6e 64 20 75 6e 74 69 | 6c 20 74 68 65 72 65 20 |end unti|l there |
|000052c0| 69 73 20 74 68 69 73 20 | 6d 75 63 68 20 73 70 61 |is this |much spa|
|000052d0| 63 65 20 69 6e 20 74 68 | 65 20 73 65 6e 64 20 62 |ce in th|e send b|
|000052e0| 75 66 66 65 72 20 62 65 | 66 6f 72 65 20 69 74 20 |uffer be|fore it |
|000052f0| 73 74 61 72 74 73 20 74 | 6f 20 73 65 6e 64 20 74 |starts t|o send t|
|00005300| 68 65 20 64 61 74 61 2e | 0a 0a 20 09 3c 53 4f 5f |he data.|.. .<SO_|
|00005310| 52 43 56 4c 4f 57 41 54 | 3d 3e 63 6f 6e 73 74 61 |RCVLOWAT|=>consta|
|00005320| 6e 74 73 3e 09 53 65 74 | 20 74 68 65 20 6c 6f 77 |nts>.Set| the low|
|00005330| 20 77 61 74 65 72 20 6d | 61 72 6b 20 6f 66 20 74 | water m|ark of t|
|00005340| 68 65 20 72 65 63 65 69 | 76 65 20 62 75 66 66 65 |he recei|ve buffe|
|00005350| 72 2e 20 54 68 65 20 73 | 74 61 63 6b 20 77 69 6c |r. The s|tack wil|
|00005360| 6c 20 61 6c 77 61 79 73 | 20 74 72 79 20 61 6e 64 |l always| try and|
|00005370| 20 72 65 74 75 72 6e 20 | 61 74 20 6c 65 61 73 74 | return |at least|
|00005380| 20 74 68 69 73 20 6d 61 | 6e 79 20 62 79 74 65 73 | this ma|ny bytes|
|00005390| 20 6f 6e 20 61 20 72 65 | 61 64 2c 20 62 6c 6f 63 | on a re|ad, bloc|
|000053a0| 6b 69 6e 67 20 69 66 20 | 6e 65 63 65 73 73 61 72 |king if |necessar|
|000053b0| 79 2e 0a 0a 20 09 3c 53 | 4f 5f 53 4e 44 54 49 4d |y... .<S|O_SNDTIM|
|000053c0| 45 4f 3d 3e 63 6f 6e 73 | 74 61 6e 74 73 3e 09 53 |EO=>cons|tants>.S|
|000053d0| 65 74 20 74 68 65 20 73 | 65 6e 64 20 74 69 6d 65 |et the s|end time|
|000053e0| 6f 75 74 2e 20 54 68 69 | 73 20 69 73 20 74 68 65 |out. Thi|s is the|
|000053f0| 20 6d 61 78 69 6d 75 6d | 20 6c 65 6e 67 74 68 20 | maximum| length |
|00005400| 6f 66 20 74 69 6d 65 20 | 74 68 61 74 20 61 20 73 |of time |that a s|
|00005410| 65 6e 64 20 63 61 6c 6c | 20 77 69 6c 6c 20 62 6c |end call| will bl|
|00005420| 6f 63 6b 20 66 6f 72 20 | 62 65 66 6f 72 65 20 72 |ock for |before r|
|00005430| 65 74 75 72 6e 69 6e 67 | 2e 20 54 68 65 20 61 72 |eturning|. The ar|
|00005440| 67 75 6d 65 6e 74 20 69 | 73 20 61 20 70 6f 69 6e |gument i|s a poin|
|00005450| 74 65 72 20 74 6f 20 61 | 20 74 69 6d 65 6f 75 74 |ter to a| timeout|
|00005460| 20 62 6c 6f 63 6b 20 61 | 73 20 64 65 73 63 72 69 | block a|s descri|
|00005470| 62 65 64 20 75 6e 64 65 | 72 20 3c 53 6f 63 6b 65 |bed unde|r <Socke|
|00005480| 74 5f 53 65 6c 65 63 74 | 3e 2e 0a 0a 20 09 3c 53 |t_Select|>... .<S|
|00005490| 4f 5f 52 43 56 54 49 4d | 45 4f 3d 3e 63 6f 6e 73 |O_RCVTIM|EO=>cons|
|000054a0| 74 61 6e 74 73 3e 09 53 | 65 74 20 74 68 65 20 72 |tants>.S|et the r|
|000054b0| 65 63 65 69 76 65 20 74 | 69 6d 65 6f 75 74 2e 20 |eceive t|imeout. |
|000054c0| 54 68 69 73 20 69 73 20 | 74 68 65 20 6d 61 78 69 |This is |the maxi|
|000054d0| 6d 75 6d 20 6c 65 6e 67 | 74 68 20 6f 66 20 74 69 |mum leng|th of ti|
|000054e0| 6d 65 20 74 68 61 74 20 | 61 20 72 65 63 65 69 76 |me that |a receiv|
|000054f0| 65 20 63 61 6c 6c 20 77 | 69 6c 6c 20 62 6c 6f 63 |e call w|ill bloc|
|00005500| 6b 20 66 6f 72 20 62 65 | 66 6f 72 65 20 72 65 74 |k for be|fore ret|
|00005510| 75 72 6e 69 6e 67 2e 20 | 54 68 65 20 61 72 67 75 |urning. |The argu|
|00005520| 6d 65 6e 74 20 69 73 20 | 61 20 70 6f 69 6e 74 65 |ment is |a pointe|
|00005530| 72 20 74 6f 20 61 20 74 | 69 6d 65 6f 75 74 20 62 |r to a t|imeout b|
|00005540| 6c 6f 63 6b 20 61 73 20 | 64 65 73 63 72 69 62 65 |lock as |describe|
|00005550| 64 20 75 6e 64 65 72 20 | 3c 53 6f 63 6b 65 74 5f |d under |<Socket_|
|00005560| 53 65 6c 65 63 74 3e 2e | 0a 0a 54 68 65 20 49 50 |Select>.|..The IP|
|00005570| 20 70 72 6f 74 6f 63 6f | 6c 20 61 6c 73 6f 20 73 | protoco|l also s|
|00005580| 75 70 70 6f 72 74 73 20 | 73 65 76 65 72 61 6c 20 |upports |several |
|00005590| 6f 70 74 69 6f 6e 73 3a | 0a 0a 20 09 3c 49 50 5f |options:|.. .<IP_|
|000055a0| 4f 50 54 49 4f 4e 53 3d | 3e 63 6f 6e 73 74 61 6e |OPTIONS=|>constan|
|000055b0| 74 73 3e 09 53 65 74 20 | 73 6f 6d 65 20 49 50 20 |ts>.Set |some IP |
|000055c0| 6f 70 74 69 6f 6e 73 20 | 77 68 69 63 68 20 77 69 |options |which wi|
|000055d0| 6c 6c 20 62 65 20 61 64 | 64 65 64 20 74 6f 20 65 |ll be ad|ded to e|
|000055e0| 61 63 68 20 70 61 63 6b | 65 74 20 73 65 6e 74 20 |ach pack|et sent |
|000055f0| 6f 6e 20 61 20 73 6f 63 | 6b 65 74 2e 0a 0a 20 09 |on a soc|ket... .|
|00005600| 3c 49 50 5f 48 44 52 49 | 4e 43 4c 3d 3e 63 6f 6e |<IP_HDRI|NCL=>con|
|00005610| 73 74 61 6e 74 73 3e 09 | 54 68 69 73 20 74 6f 67 |stants>.|This tog|
|00005620| 67 6c 65 73 20 77 68 65 | 74 68 65 72 20 64 61 74 |gles whe|ther dat|
|00005630| 61 20 73 65 6e 74 20 6f | 6e 20 61 20 73 6f 63 6b |a sent o|n a sock|
|00005640| 65 74 20 61 6c 72 65 61 | 64 79 20 68 61 73 20 61 |et alrea|dy has a|
|00005650| 6e 20 49 50 20 68 65 61 | 64 65 72 20 69 6e 63 6c |n IP hea|der incl|
|00005660| 75 64 65 64 20 6f 72 20 | 6e 6f 74 2e 20 54 68 69 |uded or |not. Thi|
|00005670| 73 20 73 68 6f 75 6c 64 | 20 6f 6e 6c 79 20 65 76 |s should| only ev|
|00005680| 65 72 20 62 65 20 73 65 | 74 20 6f 6e 20 72 61 77 |er be se|t on raw|
|00005690| 20 73 6f 63 6b 65 74 73 | 2e 0a 0a 20 09 3c 49 50 | sockets|... .<IP|
|000056a0| 5f 54 4f 53 3d 3e 63 6f | 6e 73 74 61 6e 74 73 3e |_TOS=>co|nstants>|
|000056b0| 09 53 65 74 20 74 68 65 | 20 74 79 70 65 20 6f 66 |.Set the| type of|
|000056c0| 20 73 65 72 76 69 63 65 | 20 66 69 65 6c 64 20 69 | service| field i|
|000056d0| 6e 20 70 61 63 6b 65 74 | 73 20 73 65 6e 74 20 75 |n packet|s sent u|
|000056e0| 73 69 6e 67 20 74 68 69 | 73 20 73 6f 63 6b 65 74 |sing thi|s socket|
|000056f0| 20 74 6f 20 74 68 65 20 | 73 70 65 63 69 66 69 65 | to the |specifie|
|00005700| 64 20 76 61 6c 75 65 2e | 0a 0a 20 09 3c 49 50 5f |d value.|.. .<IP_|
|00005710| 54 54 4c 3d 3e 63 6f 6e | 73 74 61 6e 74 73 3e 09 |TTL=>con|stants>.|
|00005720| 53 65 74 20 74 68 65 20 | 74 69 6d 65 20 74 6f 20 |Set the |time to |
|00005730| 6c 69 76 65 20 66 69 65 | 6c 64 20 69 6e 20 70 61 |live fie|ld in pa|
|00005740| 63 6b 65 74 73 20 73 65 | 6e 74 20 75 73 69 6e 67 |ckets se|nt using|
|00005750| 20 74 68 69 73 20 73 6f | 63 6b 65 74 20 74 6f 20 | this so|cket to |
|00005760| 74 68 65 20 73 70 65 63 | 69 66 69 65 64 20 76 61 |the spec|ified va|
|00005770| 6c 75 65 2e 0a 0a 46 69 | 6e 61 6c 6c 79 2c 20 74 |lue...Fi|nally, t|
|00005780| 68 65 72 65 20 61 72 65 | 20 61 20 6e 75 6d 62 65 |here are| a numbe|
|00005790| 72 20 6f 66 20 6f 70 74 | 69 6f 6e 73 20 73 75 70 |r of opt|ions sup|
|000057a0| 70 6f 72 74 65 64 20 62 | 79 20 74 68 65 20 54 43 |ported b|y the TC|
|000057b0| 50 20 70 72 6f 74 6f 63 | 6f 6c 3a 0a 0a 20 09 3c |P protoc|ol:.. .<|
|000057c0| 54 43 50 5f 4e 4f 44 45 | 4c 41 59 3d 3e 63 6f 6e |TCP_NODE|LAY=>con|
|000057d0| 73 74 61 6e 74 73 3e 09 | 44 69 73 61 62 6c 65 20 |stants>.|Disable |
|000057e0| 74 68 65 20 4e 61 67 6c | 65 20 61 6c 67 6f 72 69 |the Nagl|e algori|
|000057f0| 74 68 6d 20 66 6f 72 20 | 74 68 69 73 20 63 6f 6e |thm for |this con|
|00005800| 6e 65 63 74 69 6f 6e 2c | 20 74 6f 20 65 6e 73 75 |nection,| to ensu|
|00005810| 72 65 20 74 68 61 74 20 | 64 61 74 61 20 69 73 20 |re that |data is |
|00005820| 61 6c 77 61 79 73 20 73 | 65 6e 74 20 69 6d 6d 65 |always s|ent imme|
|00005830| 64 69 61 74 65 6c 79 2e | 0a 0a 20 09 3c 54 43 50 |diately.|.. .<TCP|
|00005840| 5f 4d 41 58 53 45 47 3d | 3e 63 6f 6e 73 74 61 6e |_MAXSEG=|>constan|
|00005850| 74 73 3e 09 53 65 74 20 | 74 68 65 20 6d 61 78 69 |ts>.Set |the maxi|
|00005860| 6d 75 6d 20 73 65 67 6d | 65 6e 74 20 73 69 7a 65 |mum segm|ent size|
|00005870| 20 74 6f 20 75 73 65 20 | 66 6f 72 20 64 61 74 61 | to use |for data|
|00005880| 20 73 65 6e 74 20 6f 6e | 20 74 68 69 73 20 63 6f | sent on| this co|
|00005890| 6e 6e 65 63 74 69 6f 6e | 2e 00 00 00 44 41 54 41 |nnection|....DATA|
|000058a0| 8c 01 00 00 53 6f 63 6b | 65 74 5f 53 68 75 74 64 |....Sock|et_Shutd|
|000058b0| 6f 77 6e 20 20 28 26 34 | 31 32 30 42 29 20 20 73 |own (&4|120B) s|
|000058c0| 68 75 74 64 6f 77 6e 28 | 29 0a 45 6e 74 72 79 0a |hutdown(|).Entry.|
|000058d0| 20 09 52 30 20 3d 20 53 | 6f 63 6b 65 74 20 64 65 | .R0 = S|ocket de|
|000058e0| 73 63 72 69 70 74 6f 72 | 0a 20 09 52 31 20 3d 20 |scriptor|. .R1 = |
|000058f0| 44 69 72 65 63 74 69 6f | 6e 20 6f 66 20 73 68 75 |Directio|n of shu|
|00005900| 74 64 6f 77 6e 0a 45 78 | 69 74 0a 20 09 52 30 20 |tdown.Ex|it. .R0 |
|00005910| 63 6f 72 72 75 70 74 65 | 64 0a 0a 50 65 72 66 6f |corrupte|d..Perfo|
|00005920| 72 6d 20 61 20 68 61 6c | 66 20 63 6c 6f 73 65 20 |rm a hal|f close |
|00005930| 6f 6e 20 61 20 73 74 72 | 65 61 6d 20 73 6f 63 6b |on a str|eam sock|
|00005940| 65 74 2e 20 54 68 69 73 | 20 63 61 6c 6c 20 69 73 |et. This| call is|
|00005950| 20 61 62 6c 65 20 74 6f | 20 73 68 75 74 20 64 6f | able to| shut do|
|00005960| 77 6e 20 65 69 74 68 65 | 72 20 74 68 65 20 73 65 |wn eithe|r the se|
|00005970| 6e 64 20 6f 72 20 72 65 | 63 65 69 76 65 64 20 73 |nd or re|ceived s|
|00005980| 69 64 65 20 6f 66 20 74 | 68 65 20 73 6f 63 6b 65 |ide of t|he socke|
|00005990| 74 2c 20 6f 72 20 62 6f | 74 68 2e 20 54 68 65 20 |t, or bo|th. The |
|000059a0| 64 69 72 65 63 74 69 6f | 6e 20 70 61 72 61 6d 65 |directio|n parame|
|000059b0| 74 65 72 20 69 73 20 65 | 69 74 68 65 72 20 30 20 |ter is e|ither 0 |
|000059c0| 74 6f 20 73 68 75 74 20 | 64 6f 77 6e 20 74 68 65 |to shut |down the|
|000059d0| 20 72 65 63 65 69 76 65 | 20 73 69 64 65 2c 20 31 | receive| side, 1|
|000059e0| 20 74 6f 20 73 68 75 74 | 20 64 6f 77 6e 20 74 68 | to shut| down th|
|000059f0| 65 20 73 65 6e 64 20 73 | 69 64 65 2c 20 6f 72 20 |e send s|ide, or |
|00005a00| 32 20 74 6f 20 73 68 75 | 74 20 64 6f 77 6e 20 62 |2 to shu|t down b|
|00005a10| 6f 74 68 20 73 69 64 65 | 73 20 6f 66 20 74 68 65 |oth side|s of the|
|00005a20| 20 73 6f 63 6b 65 74 2e | 44 41 54 41 50 00 00 00 | socket.|DATAP...|
|00005a30| 53 6f 63 6b 65 74 5f 53 | 74 61 74 20 20 28 26 34 |Socket_S|tat (&4|
|00005a40| 31 32 31 35 29 20 20 73 | 74 61 74 28 29 0a 54 68 |1215) s|tat().Th|
|00005a50| 69 73 20 63 61 6c 6c 20 | 69 73 20 6e 6f 74 20 73 |is call |is not s|
|00005a60| 75 70 70 6f 72 74 65 64 | 20 62 79 20 46 72 65 65 |upported| by Free|
|00005a70| 4e 65 74 20 79 65 74 2e | 44 41 54 41 33 01 00 00 |Net yet.|DATA3...|
|00005a80| 53 6f 63 6b 65 74 5f 57 | 72 69 74 65 20 20 28 26 |Socket_W|rite (&|
|00005a90| 34 31 32 31 34 29 20 20 | 77 72 69 74 65 28 29 0a |41214) |write().|
|00005aa0| 45 6e 74 72 79 0a 20 09 | 52 30 20 3d 20 53 6f 63 |Entry. .|R0 = Soc|
|00005ab0| 6b 65 74 20 64 65 73 63 | 72 69 70 74 6f 72 0a 20 |ket desc|riptor. |
|00005ac0| 09 52 31 20 3d 20 50 6f | 69 6e 74 65 72 20 74 6f |.R1 = Po|inter to|
|00005ad0| 20 64 61 74 61 20 74 6f | 20 62 65 20 73 65 6e 74 | data to| be sent|
|00005ae0| 0a 20 09 52 32 20 3d 20 | 53 69 7a 65 20 6f 66 20 |. .R2 = |Size of |
|00005af0| 62 75 66 66 65 72 0a 45 | 78 69 74 0a 20 09 52 30 |buffer.E|xit. .R0|
|00005b00| 20 3d 20 41 6d 6f 75 6e | 74 20 6f 66 20 64 61 74 | = Amoun|t of dat|
|00005b10| 61 20 73 65 6e 74 0a 0a | 54 68 69 73 20 63 61 6c |a sent..|This cal|
|00005b20| 6c 20 73 65 6e 64 73 20 | 64 61 74 61 20 6f 6e 20 |l sends |data on |
|00005b30| 61 20 73 6f 63 6b 65 74 | 20 69 6e 20 74 68 65 20 |a socket| in the |
|00005b40| 73 61 6d 65 20 73 74 79 | 6c 65 20 61 73 20 3c 53 |same sty|le as <S|
|00005b50| 6f 63 6b 65 74 5f 53 65 | 6e 64 3e 20 65 78 63 65 |ocket_Se|nd> exce|
|00005b60| 70 74 20 74 68 61 74 20 | 74 68 65 72 65 20 69 73 |pt that |there is|
|00005b70| 20 6e 6f 20 66 6c 61 67 | 73 20 61 72 67 75 6d 65 | no flag|s argume|
|00005b80| 6e 74 2c 20 73 6f 20 61 | 6c 6c 20 66 6c 61 67 73 |nt, so a|ll flags|
|00005b90| 20 61 72 65 20 74 72 65 | 61 74 65 64 20 61 73 20 | are tre|ated as |
|00005ba0| 62 65 69 6e 67 20 7a 65 | 72 6f 2e 00 44 41 54 41 |being ze|ro..DATA|
|00005bb0| 7b 01 00 00 53 6f 63 6b | 65 74 5f 57 72 69 74 65 |{...Sock|et_Write|
|00005bc0| 76 20 20 28 26 34 31 32 | 31 37 29 20 20 77 72 69 |v (&412|17) wri|
|00005bd0| 74 65 76 28 29 0a 45 6e | 74 72 79 0a 20 09 52 30 |tev().En|try. .R0|
|00005be0| 20 3d 20 53 6f 63 6b 65 | 74 20 64 65 73 63 72 69 | = Socke|t descri|
|00005bf0| 70 74 6f 72 0a 20 09 52 | 31 20 3d 20 50 6f 69 6e |ptor. .R|1 = Poin|
|00005c00| 74 65 72 20 74 6f 20 61 | 72 72 61 79 20 6f 66 20 |ter to a|rray of |
|00005c10| 62 75 66 66 65 72 20 64 | 65 73 63 72 69 70 74 6f |buffer d|escripto|
|00005c20| 72 73 0a 20 09 52 32 20 | 3d 20 4e 75 6d 62 65 72 |rs. .R2 |= Number|
|00005c30| 20 6f 66 20 62 75 66 66 | 65 72 20 64 65 73 63 72 | of buff|er descr|
|00005c40| 69 70 74 6f 72 73 0a 45 | 78 69 74 0a 20 09 52 30 |iptors.E|xit. .R0|
|00005c50| 20 3d 20 41 6d 6f 75 6e | 74 20 6f 66 20 64 61 74 | = Amoun|t of dat|
|00005c60| 61 20 72 65 63 65 69 76 | 65 64 0a 0a 54 68 69 73 |a receiv|ed..This|
|00005c70| 20 63 61 6c 6c 20 73 65 | 6e 64 73 20 64 61 74 61 | call se|nds data|
|00005c80| 20 66 72 6f 6d 20 61 20 | 73 63 61 74 74 65 72 20 | from a |scatter |
|00005c90| 61 72 72 61 79 2e 20 54 | 68 65 20 62 75 66 66 65 |array. T|he buffe|
|00005ca0| 72 20 64 65 73 63 72 69 | 70 74 6f 72 73 20 61 72 |r descri|ptors ar|
|00005cb0| 65 20 74 68 65 20 73 61 | 6d 65 20 61 73 20 74 68 |e the sa|me as th|
|00005cc0| 6f 73 65 20 64 65 73 63 | 72 69 62 65 64 20 66 6f |ose desc|ribed fo|
|00005cd0| 72 20 3c 53 6f 63 6b 65 | 74 5f 52 65 63 76 6d 73 |r <Socke|t_Recvms|
|00005ce0| 67 3e 2c 20 61 6e 64 20 | 61 73 20 77 69 74 68 20 |g>, and |as with |
|00005cf0| 3c 53 6f 63 6b 65 74 5f | 57 72 69 74 65 3e 20 74 |<Socket_|Write> t|
|00005d00| 68 65 20 66 6c 61 67 73 | 20 61 72 65 20 61 6c 6c |he flags| are all|
|00005d10| 20 74 72 65 61 74 65 64 | 20 61 73 20 62 65 69 6e | treated| as bein|
|00005d20| 67 20 7a 65 72 6f 2e 00 | 44 41 54 41 20 00 00 00 |g zero..|DATA ...|
|00005d30| 00 40 2d e9 00 e0 d0 e5 | 58 00 5e e3 78 00 5e 13 |.@-.....|X.^.x.^.|
|00005d40| 01 00 80 02 00 80 fd e8 | 44 41 54 41 b4 04 00 00 |........|DATA....|
|00005d50| 49 6e 74 65 72 6e 65 74 | 0a 23 50 61 72 65 6e 74 |Internet|.#Parent|
|00005d60| 20 53 74 72 6f 6e 67 48 | 65 6c 70 3a 21 4d 65 6e | StrongH|elp:!Men|
|00005d70| 75 0a 23 50 72 65 66 69 | 78 20 53 6f 63 6b 65 74 |u.#Prefi|x Socket|
|00005d80| 5f 0a 23 42 61 63 6b 67 | 72 6f 75 6e 64 20 57 69 |_.#Backg|round Wi|
|00005d90| 6d 70 20 31 0a 23 66 48 | 31 3a 49 6e 74 65 72 6e |mp 1.#fH|1:Intern|
|00005da0| 65 74 0a 23 4c 69 6e 65 | 3b 57 72 61 70 20 4f 66 |et.#Line|;Wrap Of|
|00005db0| 66 0a 23 66 48 32 3a 46 | 72 65 65 4e 65 74 0a 23 |f.#fH2:F|reeNet.#|
|00005dc0| 41 6c 69 67 6e 20 43 65 | 6e 74 72 65 0a 48 65 6c |Align Ce|ntre.Hel|
|00005dd0| 70 20 74 65 78 74 20 69 | 73 20 62 79 20 3c 54 6f |p text i|s by <To|
|00005de0| 6d 20 48 75 67 68 65 73 | 3d 3e 46 69 6c 65 74 79 |m Hughes|=>Filety|
|00005df0| 70 65 73 3a 41 75 74 68 | 6f 72 73 5f 54 6f 6d 48 |pes:Auth|ors_TomH|
|00005e00| 75 67 68 65 73 3e 2c 20 | a9 20 31 39 39 35 0a 23 |ughes>, |. 1995.#|
|00005e10| 41 6c 69 67 6e 3b 4c 69 | 6e 65 0a 23 57 72 61 70 |Align;Li|ne.#Wrap|
|00005e20| 20 6f 66 66 0a 23 54 61 | 62 6c 65 20 43 6f 6c 75 | off.#Ta|ble Colu|
|00005e30| 6d 6e 73 20 35 0a 3c 41 | 63 63 65 70 74 3e 0a 3c |mns 5.<A|ccept>.<|
|00005e40| 42 69 6e 64 3e 0a 3c 43 | 6c 6f 73 65 3e 0a 3c 43 |Bind>.<C|lose>.<C|
|00005e50| 6f 6e 6e 65 63 74 3e 0a | 3c 43 72 65 61 74 3e 0a |onnect>.|<Creat>.|
|00005e60| 3c 47 65 74 70 65 65 72 | 6e 61 6d 65 3e 0a 3c 47 |<Getpeer|name>.<G|
|00005e70| 65 74 73 6f 63 6b 6e 61 | 6d 65 3e 0a 3c 47 65 74 |etsockna|me>.<Get|
|00005e80| 73 6f 63 6b 6f 70 74 3e | 0a 3c 47 65 74 74 73 69 |sockopt>|.<Gettsi|
|00005e90| 7a 65 3e 0a 3c 49 6f 63 | 74 6c 3e 0a 3c 4c 69 73 |ze>.<Ioc|tl>.<Lis|
|00005ea0| 74 65 6e 3e 0a 3c 52 65 | 63 76 3e 0a 3c 52 65 63 |ten>.<Re|cv>.<Rec|
|00005eb0| 76 66 72 6f 6d 3e 0a 3c | 52 65 63 76 6d 73 67 3e |vfrom>.<|Recvmsg>|
|00005ec0| 0a 3c 52 65 61 64 3e 0a | 3c 52 65 61 64 76 3e 0a |.<Read>.|<Readv>.|
|00005ed0| 3c 53 65 6e 64 3e 0a 3c | 53 65 6e 64 6d 73 67 3e |<Send>.<|Sendmsg>|
|00005ee0| 0a 3c 53 65 6e 64 74 6f | 3e 0a 3c 53 65 6e 64 74 |.<Sendto|>.<Sendt|
|00005ef0| 6f 73 6d 3e 0a 3c 53 65 | 6c 65 63 74 3e 0a 3c 53 |osm>.<Se|lect>.<S|
|00005f00| 65 74 73 6f 63 6b 6f 70 | 74 3e 0a 3c 53 68 75 74 |etsockop|t>.<Shut|
|00005f10| 64 6f 77 6e 3e 0a 3c 53 | 74 61 74 3e 0a 3c 57 72 |down>.<S|tat>.<Wr|
|00005f20| 69 74 65 3e 0a 3c 57 72 | 69 74 65 76 3e 0a 0a 3c |ite>.<Wr|itev>..<|
|00005f30| 45 76 65 6e 74 3d 3e 74 | 68 65 69 6e 74 65 72 6e |Event=>t|heintern|
|00005f40| 65 74 65 76 65 6e 74 3e | 0a 3c 45 72 72 6f 72 73 |etevent>|.<Errors|
|00005f50| 3d 3e 65 72 72 6f 72 73 | 3e 0a 3c 43 6f 6e 73 74 |=>errors|>.<Const|
|00005f60| 61 6e 74 73 3d 3e 63 6f | 6e 73 74 61 6e 74 73 3e |ants=>co|nstants>|
|00005f70| 0a 23 45 6e 64 54 61 62 | 6c 65 0a 23 4c 69 6e 65 |.#EndTab|le.#Line|
|00005f80| 0a 23 0a 23 0a 23 66 48 | 32 3a 49 6e 65 74 44 42 |.#.#.#fH|2:InetDB|
|00005f90| 0a 23 41 6c 69 67 6e 20 | 43 65 6e 74 72 65 0a 48 |.#Align |Centre.H|
|00005fa0| 65 6c 70 20 74 65 78 74 | 20 69 73 20 62 79 20 3c |elp text| is by <|
|00005fb0| 41 64 61 6d 20 47 6f 6f | 64 66 65 6c 6c 6f 77 3d |Adam Goo|dfellow=|
|00005fc0| 3e 46 69 6c 65 74 79 70 | 65 73 3a 41 75 74 68 6f |>Filetyp|es:Autho|
|00005fd0| 72 73 5f 41 64 61 6d 47 | 6f 6f 64 66 65 6c 6c 6f |rs_AdamG|oodfello|
|00005fe0| 77 3e 2c 20 a9 20 31 39 | 39 34 0a 23 41 6c 69 67 |w>, . 19|94.#Alig|
|00005ff0| 6e 3b 4c 69 6e 65 0a 23 | 54 61 62 6c 65 20 43 6f |n;Line.#|Table Co|
|00006000| 6c 75 6d 6e 73 20 32 0a | 3c 47 65 74 48 6f 73 74 |lumns 2.|<GetHost|
|00006010| 42 79 4e 61 6d 65 3d 3e | 49 6e 74 65 72 6e 65 74 |ByName=>|Internet|
|00006020| 5f 47 65 74 48 6f 73 74 | 42 79 4e 61 6d 65 3e 0a |_GetHost|ByName>.|
|00006030| 3c 47 65 74 48 6f 73 74 | 42 79 41 64 64 72 3d 3e |<GetHost|ByAddr=>|
|00006040| 49 6e 74 65 72 6e 65 74 | 5f 47 65 74 48 6f 73 74 |Internet|_GetHost|
|00006050| 42 79 41 64 64 72 3e 0a | 23 45 6e 64 54 61 62 6c |ByAddr>.|#EndTabl|
|00006060| 65 0a 23 4c 69 6e 65 0a | 23 0a 23 0a 23 66 48 32 |e.#Line.|#.#.#fH2|
|00006070| 3a 53 79 73 4c 6f 67 0a | 23 41 6c 69 67 6e 20 43 |:SysLog.|#Align C|
|00006080| 65 6e 74 72 65 0a 48 65 | 6c 70 20 74 65 78 74 20 |entre.He|lp text |
|00006090| 69 73 20 62 79 20 3c 53 | 74 65 77 61 72 74 20 42 |is by <S|tewart B|
|000060a0| 72 6f 64 69 65 3d 3e 46 | 69 6c 65 74 79 70 65 73 |rodie=>F|iletypes|
|000060b0| 3a 41 75 74 68 6f 72 73 | 5f 53 74 65 77 61 72 74 |:Authors|_Stewart|
|000060c0| 42 72 6f 64 69 65 3e 2c | 20 a9 20 31 39 39 35 0a |Brodie>,| . 1995.|
|000060d0| 23 41 6c 69 67 6e 3b 4c | 69 6e 65 0a 23 54 61 62 |#Align;L|ine.#Tab|
|000060e0| 6c 65 20 43 6f 6c 75 6d | 6e 73 20 34 0a 3c 53 79 |le Colum|ns 4.<Sy|
|000060f0| 73 4c 6f 67 3d 3e 49 6e | 74 65 72 6e 65 74 55 74 |sLog=>In|ternetUt|
|00006100| 69 6c 73 5f 53 79 73 4c | 6f 67 3e 0a 3c 4c 6f 67 |ils_SysL|og>.<Log|
|00006110| 46 69 6c 65 3d 3e 49 6e | 74 65 72 6e 65 74 55 74 |File=>In|ternetUt|
|00006120| 69 6c 73 5f 4c 6f 67 46 | 69 6c 65 3e 0a 3c 4c 6f |ils_LogF|ile>.<Lo|
|00006130| 67 4c 65 76 65 6c 3d 3e | 49 6e 74 65 72 6e 65 74 |gLevel=>|Internet|
|00006140| 55 74 69 6c 73 5f 4c 6f | 67 4c 65 76 65 6c 3e 0a |Utils_Lo|gLevel>.|
|00006150| 3c 52 65 61 64 45 72 72 | 6f 72 4d 65 73 73 61 67 |<ReadErr|orMessag|
|00006160| 65 3d 3e 49 6e 74 65 72 | 6e 65 74 55 74 69 6c 73 |e=>Inter|netUtils|
|00006170| 5f 52 65 61 64 45 72 72 | 6f 72 4d 65 73 73 61 67 |_ReadErr|orMessag|
|00006180| 65 3e 0a 23 45 6e 64 54 | 61 62 6c 65 0a 23 4c 69 |e>.#EndT|able.#Li|
|00006190| 6e 65 3b 41 6c 69 67 6e | 20 43 65 6e 74 72 65 0a |ne;Align| Centre.|
|000061a0| 7b 2f 7d 53 74 72 6f 6e | 67 48 65 6c 70 7b 2f 7d |{/}Stron|gHelp{/}|
|000061b0| 20 76 65 72 73 69 6f 6e | 20 62 79 20 3c 44 61 76 | version| by <Dav|
|000061c0| 69 64 20 54 68 6f 6d 61 | 73 3d 3e 46 69 6c 65 74 |id Thoma|s=>Filet|
|000061d0| 79 70 65 73 3a 41 75 74 | 68 6f 72 73 5f 44 61 76 |ypes:Aut|hors_Dav|
|000061e0| 65 54 68 6f 6d 61 73 3e | 2c 20 32 30 74 68 20 41 |eThomas>|, 20th A|
|000061f0| 75 67 20 31 39 39 36 20 | 28 72 32 29 44 49 52 24 |ug 1996 |(r2)DIR$|
|00006200| 5c 00 00 00 5c 00 00 00 | 58 62 00 00 46 ff ff ff |\...\...|Xb..F...|
|00006210| 30 38 9c d8 b2 00 00 00 | 13 00 00 00 00 00 00 00 |08......|........|
|00006220| 47 65 74 48 6f 73 74 42 | 79 41 64 64 72 00 00 00 |GetHostB|yAddr...|
|00006230| 0c 63 00 00 46 ff ff ff | 45 3b 9c d8 8a 00 00 00 |.c..F...|E;......|
|00006240| 13 00 00 00 00 00 00 00 | 47 65 74 48 6f 73 74 42 |........|GetHostB|
|00006250| 79 4e 61 6d 65 00 00 00 | 44 41 54 41 b2 00 00 00 |yName...|DATA....|
|00006260| 49 6e 74 65 72 6e 65 74 | 5f 47 65 74 48 6f 73 74 |Internet|_GetHost|
|00006270| 42 79 41 64 64 72 20 28 | 26 34 36 30 30 31 29 0a |ByAddr (|&46001).|
|00006280| 45 6e 74 72 79 0a 20 20 | 52 30 20 3d 20 30 0a 20 |Entry. |R0 = 0. |
|00006290| 20 52 31 20 3d 20 2d 3e | 20 68 6f 73 74 20 61 64 | R1 = ->| host ad|
|000062a0| 64 72 0a 20 20 52 32 20 | 3d 20 6c 65 6e 20 6f 66 |dr. R2 |= len of|
|000062b0| 20 61 64 64 72 0a 20 20 | 52 33 20 3d 20 74 79 70 | addr. |R3 = typ|
|000062c0| 65 20 6f 66 20 61 64 64 | 72 0a 45 78 69 74 0a 20 |e of add|r.Exit. |
|000062d0| 20 52 31 20 3d 20 70 6f | 69 6e 74 65 72 20 74 6f | R1 = po|inter to|
|000062e0| 20 3c 68 6f 73 74 65 6e | 74 3e 20 73 74 72 75 63 | <hosten|t> struc|
|000062f0| 74 75 72 65 2c 20 6f 72 | 20 4e 55 4c 4c 20 69 66 |ture, or| NULL if|
|00006300| 20 6e 6f 74 20 66 6f 75 | 6e 64 00 00 44 41 54 41 | not fou|nd..DATA|
|00006310| 8a 00 00 00 49 6e 74 65 | 72 6e 65 74 5f 47 65 74 |....Inte|rnet_Get|
|00006320| 48 6f 73 74 42 79 4e 61 | 6d 65 20 28 26 34 36 30 |HostByNa|me (&460|
|00006330| 30 30 29 0a 45 6e 74 72 | 79 0a 20 20 52 30 20 3d |00).Entr|y. R0 =|
|00006340| 20 30 0a 20 20 52 31 20 | 3d 20 2d 3e 20 68 6f 73 | 0. R1 |= -> hos|
|00006350| 74 20 6e 61 6d 65 0a 45 | 78 69 74 0a 20 20 52 31 |t name.E|xit. R1|
|00006360| 20 3d 20 70 6f 69 6e 74 | 65 72 20 74 6f 20 3c 68 | = point|er to <h|
|00006370| 6f 73 74 65 6e 74 3e 20 | 73 74 72 75 63 74 75 72 |ostent> |structur|
|00006380| 65 20 6f 72 20 4e 55 4c | 4c 20 69 66 20 6e 6f 74 |e or NUL|L if not|
|00006390| 20 66 6f 75 6e 64 00 00 | 44 49 52 24 9c 00 00 00 | found..|DIR$....|
|000063a0| 9c 00 00 00 34 64 00 00 | 46 ff ff ff 0b 77 ff d8 |....4d..|F....w..|
|000063b0| 68 00 00 00 13 00 00 00 | 00 00 00 00 53 79 73 4c |h.......|....SysL|
|000063c0| 6f 67 00 00 9c 64 00 00 | 46 ff ff ff 3a 8b ff d8 |og...d..|F...:...|
|000063d0| a7 00 00 00 13 00 00 00 | 00 00 00 00 4c 6f 67 46 |........|....LogF|
|000063e0| 69 6c 65 00 44 65 00 00 | 46 ff ff ff 4a 92 ff d8 |ile.De..|F...J...|
|000063f0| 3a 00 00 00 13 00 00 00 | 00 00 00 00 4c 6f 67 4c |:.......|....LogL|
+--------+-------------------------+-------------------------+--------+--------+
Only 25.0 KB of data is shown above.